Skip to content

Commit 2ab80ac

Browse files
committed
Add workflow to release a milestone
Closes gh-1484
1 parent a6ecd7b commit 2ab80ac

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Release Milestone
2+
on:
3+
push:
4+
tags:
5+
- v4.1.0-M[1-9]
6+
- v4.1.0-RC[1-9]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
jobs:
10+
build-and-stage-release:
11+
if: ${{ github.repository == 'spring-projects/spring-ws' }}
12+
name: Build and Stage Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check Out Code
16+
uses: actions/checkout@v4
17+
- name: Build and Publish
18+
id: build-and-publish
19+
uses: ./.github/actions/build
20+
with:
21+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
22+
publish: true
23+
- name: Stage Release
24+
uses: spring-io/artifactory-deploy-action@dc1913008c0599f0c4b1fdafb6ff3c502b3565ea # v0.0.2
25+
with:
26+
artifact-properties: |
27+
/**/spring-ws-docs-*.zip::zip.type=docs,zip.name=spring-ws,zip.deployed=false
28+
build-name: ${{ format('spring-ws-{0}', steps.build-and-publish.outputs.version)}}
29+
folder: 'deployment-repository'
30+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
31+
repository: 'libs-staging-local'
32+
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
33+
signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}
34+
uri: 'https://repo.spring.io'
35+
username: ${{ secrets.ARTIFACTORY_USERNAME }}
36+
outputs:
37+
version: ${{ steps.build-and-publish.outputs.version }}
38+
verify:
39+
name: Verify
40+
needs: build-and-stage-release
41+
uses: ./.github/workflows/verify.yml
42+
with:
43+
staging: true
44+
version: ${{ needs.build-and-stage-release.outputs.version }}
45+
secrets:
46+
google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
47+
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
48+
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
49+
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
50+
promote-release:
51+
name: Promote Release
52+
needs:
53+
- build-and-stage-release
54+
- verify
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Set up JFrog CLI
58+
uses: jfrog/setup-jfrog-cli@dff217c085c17666e8849ebdbf29c8fe5e3995e6 # v4.5.2
59+
env:
60+
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
61+
- name: Promote build
62+
run: jfrog rt build-promote ${{ format('spring-ws-{0}', needs.build-and-stage-release.outputs.version)}} ${{ github.run_number }} libs-milestone-local
63+
create-github-release:
64+
name: Create GitHub Release
65+
needs:
66+
- build-and-stage-release
67+
- promote-release
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: Check Out Code
71+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
72+
- name: Create GitHub Release
73+
uses: ./.github/actions/create-github-release
74+
with:
75+
milestone: ${{ needs.build-and-stage-release.outputs.version }}
76+
pre-release: true
77+
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}

0 commit comments

Comments
 (0)