chore: add channelKey validation rule (#202) #5
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 beta NuGet package | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- vnext | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
name: Check release | |
environment: AsyncAPI | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Semantic Release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
dry_run: true | |
ci: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
version: ${{ steps.semantic.outputs.new_release_version }} | |
pre-release: | |
runs-on: ubuntu-latest | |
name: Publish NuGet packages | |
needs: check | |
environment: AsyncAPI | |
strategy: | |
matrix: | |
package-name: [ "LEGO.AsyncAPI", "LEGO.AsyncAPI.Readers", "LEGO.AsyncAPI.Bindings" ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Setup .NET Core @ Latest | |
uses: actions/setup-dotnet@v1 | |
- name: run number with offset | |
env: | |
NUM: ${{ github.run_number }} | |
run: | | |
echo GITHUB_RUN_NUMBER_WITH_OFFSET=$(($NUM+100)) >> "$GITHUB_ENV" | |
- run: echo ${{env.GITHUB_RUN_NUMBER_WITH_OFFSET}} | |
- name: Build ${{ matrix.package-name }} project and pack NuGet package | |
run: dotnet pack src/${{ matrix.package-name }}/${{ matrix.package-name }}.csproj -c Release -o out-${{ matrix.package-name }} -p:PackageVersion=${{ needs.check.outputs.version }}-beta.${{env.GITHUB_RUN_NUMBER_WITH_OFFSET}} | |
- name: Push generated package to GitHub Packages registry | |
run: dotnet nuget push out-${{ matrix.package-name }}/*.nupkg -s https://api.nuget.org/v3/index.json --skip-duplicate -n --api-key ${{secrets.NUGET}} |