release 0.6 #22
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: release | |
run-name: release ${{ inputs.version }} | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
required: true | |
type: string | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: remote_test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 11 | |
cache: maven | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: check version | |
run: .github/semver-check.sh ${{ inputs.version }} | |
- name: create release draft | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: v${{ inputs.version }} | |
name: ${{ inputs.version }} | |
draft: true | |
- name: set project version | |
run: .github/fix-project-version.sh ${{ inputs.version }} | |
- name: update docs version | |
run: .github/fix-docs-version.sh ${{ inputs.version }} | |
- name: commit release version | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[skip ci] Set release version' | |
branch: main | |
file_pattern: '*/*.csproj README.md docs/index.md docs/guide/**' | |
- name: build | |
run: dotnet build --configuration Release | |
- name: test | |
# avoid running tests in parallel since it may happen that two tests try to modify .jmeter-dsl directory | |
run: dotnet test -m:1 --no-build --configuration Release --verbosity normal | |
env: | |
AZURE_CREDS: ${{ secrets.AZURE_CREDS }} | |
BZ_TOKEN: ${{ secrets.BZ_TOKEN }} | |
- name: package | |
run: dotnet pack --no-build --configuration Release | |
- name: publish to Nuget | |
run: .github/nuget-deploy.sh | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
- name: publish GH release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: v${{ inputs.version }} | |
allowUpdates: true | |
omitNameDuringUpdate: true | |
omitBodyDuringUpdate: true | |
updateOnlyUnreleased: true | |
draft: false | |
- name: get next alpha version | |
run: echo "ALPHA_VERSION=$(.github/next-minor-alpha.sh ${{ inputs.version }})" >> $GITHUB_ENV | |
- name: update to next ALPHA version | |
run: .github/fix-project-version.sh ${{ env.ALPHA_VERSION }} | |
- name: commit ALPHA version | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[skip ci] Set ALPHA version' | |
branch: main | |
file_pattern: '*/*.csproj README.md docs/index.md docs/guide/**' | |
- name: deploy github pages | |
run: .github/vuepress-deploy.sh | |
env: | |
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
with: | |
repository: abstracta/jmeter-dotnet-dsl-sample | |
path: jmeter-dotnet-dsl-sample | |
token: ${{ secrets.ACTIONS_TOKEN }} | |
- name: update version in sample project | |
run: .github/update-sample-version.sh ${{ inputs.version }} | |
- name: Discord notification | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
uses: Ilshidur/action-discord@master | |
with: | |
args: 'A new release is out! Check it at https://github.com/abstracta/jmeter-dotnet-dsl/releases/tag/v${{ inputs.version }}' |