Fixing so that we can have multiple of same claim type #50
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: Publish | |
env: | |
NUGET_OUTPUT: ./Artifacts/NuGet | |
DOTNET_VERSION: "6.0.400" | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to release' | |
required: true | |
default: '0.0.0' | |
type: string | |
release-notes: | |
description: 'Release notes' | |
required: true | |
default: 'No release notes' | |
type: string | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
pull_request: | |
types: [closed] | |
branches: | |
- "**" | |
paths: | |
- "**" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.release.outputs.version }} | |
publish: ${{ steps.release.outputs.should-publish }} | |
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]" | |
version: ${{ github.event.inputs.version }} | |
release-notes: ${{ github.event.inputs.release-notes }} | |
publish-dotnet-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 Release | |
- name: Create NuGet packages | |
run: dotnet pack --no-build --configuration Release -o ${{ env.NUGET_OUTPUT }} -p:PackageVersion=${{ needs.release.outputs.version }} | |
- name: Push NuGet packages | |
run: dotnet nuget push --skip-duplicate '${{ env.NUGET_OUTPUT }}/*.nupkg' --timeout 900 --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
publish-npm-packages: | |
if: needs.release.outputs.publish == 'true' | |
runs-on: ubuntu-latest | |
needs: [release] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Setup node v16 | |
uses: actions/setup-node@v3 | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
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 | |
run: | | |
yarn publish-version ${{ needs.release.outputs.version }} | |
- name: Git reset (package.json files changed) | |
run: | | |
git reset --hard |