Change to not actually resolve the IProvideIdentityDetails service, a… #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Prerelase | |
env: | |
NUGET_OUTPUT: ./Artifacts/NuGet | |
NUGET_SOURCE: https://nuget.pkg.github.com/aksio-insurtech/index.json | |
DOTNET_VERSION: "6.0.400" | |
on: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
branches: | |
- "**" | |
paths: | |
- "Source/**" | |
- ".github/workflows/**" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.release.outputs.version }} | |
publish: ${{ steps.release.outputs.should-publish }} | |
prerelease: ${{ steps.release.outputs.prerelease }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Release | |
id: release | |
uses: aksio-insurtech/release-action@v1 | |
with: | |
user-name: "Aksio Build" | |
user-email: "[email protected]" | |
publish-nuget-packages: | |
if: needs.release.outputs.publish == 'true' | |
runs-on: ubuntu-latest | |
needs: [release] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup .Net | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Remove any existing artifacts | |
run: rm -rf ${{ env.NUGET_OUTPUT }} | |
- name: Build | |
run: dotnet build --configuration Debug | |
- name: Add GitHub Package Registry to NuGet | |
run: dotnet nuget add source --name github --username aksio-insurtech --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text ${{ env.NUGET_SOURCE }} | |
- name: Create NuGet packages | |
run: dotnet pack --no-build --configuration Debug -o ${{ env.NUGET_OUTPUT }} -p:PackageVersion=${{ needs.release.outputs.version }} | |
- name: Push NuGet packages | |
run: dotnet nuget push '${{ env.NUGET_OUTPUT }}/*.nupkg' --skip-duplicate --timeout 900 --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" | |
- name: Add comment for NuGet packages | |
uses: mshick/add-pr-comment@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
message: | | |
NuGet packages for this PR, e.g. Aksio.Cratis: | |
https://github.com/aksio-insurtech/Cratis/packages/1655206?version=${{ needs.release.outputs.version }} | |
allow-repeats: false | |
publish-npm-packages: | |
if: needs.release.outputs.publish == 'true' | |
runs-on: ubuntu-latest | |
needs: [release] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup node v16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
registry-url: "https://registry.npmjs.org" | |
# - uses: actions/cache@v3 | |
# id: yarn-cache | |
# with: | |
# path: | | |
# .yarn/cache | |
# **/node_modules | |
# **/.eslintcache | |
# **/yarn.lock | |
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }} | |
# - name: Yarn install | |
# run: yarn | |
# - name: Publish NPM packages | |
# env: | |
# NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: | | |
# yarn publish-version ${{ needs.release.outputs.version }} | |
- name: Git reset (package.json files changed) | |
run: | | |
git reset --hard |