-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (97 loc) · 3.46 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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 }}'