-
Notifications
You must be signed in to change notification settings - Fork 59
100 lines (100 loc) · 3.95 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
98
99
100
name: release
run-name: release ${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
required: true
type: string
jobs:
release:
runs-on: ubuntu-latest
concurrency: blazemeter_test
steps:
- uses: actions/checkout@v4
- 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
- uses: browser-actions/setup-chrome@v1
- 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 maven project version
run: mvn --batch-mode --no-transfer-progress versions:set -DnewVersion=${{ inputs.version }} --settings .github/settings.xml
- 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: master
file_pattern: 'pom.xml */pom.xml README.md docs/index.md docs/guide/**'
- name: package release
run: mvn --batch-mode --no-transfer-progress clean install --settings .github/settings.xml
env:
BZ_TOKEN: ${{ secrets.BZ_TOKEN }}
OCTOPERF_API_KEY: ${{ secrets.OCTOPERF_API_KEY }}
AZURE_CREDS: ${{ secrets.AZURE_CREDS }}
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
DATADOG_APPLICATION_KEY: ${{ secrets.DATADOG_APPLICATION_KEY }}
- name: publish to Nexus
run: .github/maven-central-deploy.sh
env:
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
GPG_EXECUTABLE: gpg
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- name: collect release artifacts
run: echo "RELEASE_ARTIFACTS=$(.github/collect-release-artifacts.sh)" >> $GITHUB_ENV
- name: publish GH release
uses: ncipollo/release-action@v1
with:
tag: v${{ inputs.version }}
allowUpdates: true
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
updateOnlyUnreleased: true
draft: false
artifacts: "${{ env.RELEASE_ARTIFACTS }}"
- name: get next SNAPSHOT version
run: echo "SNAPSHOT_VERSION=$(.github/next-minor-snapshot.sh ${{ inputs.version }})" >> $GITHUB_ENV
- name: update to next SNAPSHOT version
run: mvn --batch-mode --no-transfer-progress versions:set -DnewVersion=${{ env.SNAPSHOT_VERSION }}
- name: commit SNAPSHOT version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[skip ci] Set SNAPSHOT version'
branch: master
file_pattern: 'pom.xml */pom.xml 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-java-dsl-sample
path: jmeter-java-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-java-dsl/releases/tag/v${{ inputs.version }}'