|
6 | 6 | concurrency: |
7 | 7 | group: ${{ github.workflow }}-${{ github.ref }} |
8 | 8 | jobs: |
9 | | - build-and-stage-release: |
10 | | - if: ${{ github.repository == 'spring-io/initializr' }} |
11 | | - name: Build and Stage Release |
12 | | - runs-on: ubuntu-latest |
13 | | - steps: |
14 | | - - name: Check out |
15 | | - uses: actions/checkout@v4 |
16 | | - - name: Set up JDK 17 |
17 | | - uses: actions/setup-java@v4 |
18 | | - with: |
19 | | - java-version: '17' |
20 | | - distribution: 'liberica' |
21 | | - cache: 'maven' |
22 | | - - name: Maven deploy |
23 | | - run: ./mvnw --no-transfer-progress --batch-mode --update-snapshots -DaltDeploymentRepository=local::file:./maven-repo/ clean deploy -Pfull |
24 | | - - name: Read version |
25 | | - id: read-version |
26 | | - shell: bash |
27 | | - run: | |
28 | | - version=$(sed -n 's/^.*<revision>\(.*\)<\/revision>.*$/\1/p' pom.xml) |
29 | | - echo "Version is $version" |
30 | | - echo "version=$version" >> $GITHUB_OUTPUT |
31 | | - - name: Stage Release |
32 | | - uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 |
33 | | - with: |
34 | | - build-name: ${{ format('initializr-{0}', steps.read-version.outputs.version)}} |
35 | | - folder: 'maven-repo' |
36 | | - password: ${{ secrets.ARTIFACTORY_PASSWORD }} |
37 | | - repository: 'libs-staging-local' |
38 | | - signing-key: ${{ secrets.GPG_PRIVATE_KEY }} |
39 | | - signing-passphrase: ${{ secrets.GPG_PASSPHRASE }} |
40 | | - uri: 'https://repo.spring.io' |
41 | | - username: ${{ secrets.ARTIFACTORY_USERNAME }} |
42 | | - outputs: |
43 | | - version: ${{ steps.read-version.outputs.version }} |
44 | | - sync-to-maven-central: |
45 | | - name: Sync to Maven Central |
46 | | - needs: |
47 | | - - build-and-stage-release |
48 | | - runs-on: ubuntu-latest |
49 | | - steps: |
50 | | - - name: Check out |
51 | | - uses: actions/checkout@v4 |
52 | | - - name: Sync to Maven Central |
53 | | - uses: ./.github/actions/sync-to-maven-central |
54 | | - with: |
55 | | - jfrog-cli-config-token: ${{ secrets.JF_ARTIFACTORY_SPRING }} |
56 | | - ossrh-s01-staging-profile: ${{ secrets.OSSRH_S01_STAGING_PROFILE }} |
57 | | - ossrh-s01-token-password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }} |
58 | | - ossrh-s01-token-username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} |
59 | | - initializr-version: ${{ needs.build-and-stage-release.outputs.version }} |
60 | | - promote-release: |
61 | | - name: Promote Release |
62 | | - needs: |
63 | | - - build-and-stage-release |
64 | | - - sync-to-maven-central |
65 | | - runs-on: ubuntu-latest |
66 | | - steps: |
67 | | - - name: Set up JFrog CLI |
68 | | - uses: jfrog/setup-jfrog-cli@7c95feb32008765e1b4e626b078dfd897c4340ad # v4.1.2 |
69 | | - env: |
70 | | - JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} |
71 | | - - name: Promote build |
72 | | - run: jfrog rt build-promote ${{ format('initializr-{0}', needs.build-and-stage-release.outputs.version)}} ${{ github.run_number }} libs-release-local |
73 | 9 | create-github-release: |
74 | 10 | name: Create GitHub Release |
75 | | - needs: |
76 | | - - build-and-stage-release |
77 | | - - promote-release |
78 | 11 | runs-on: ubuntu-latest |
79 | 12 | steps: |
80 | 13 | - name: Check out |
81 | 14 | uses: actions/checkout@v4 |
82 | 15 | - name: Create GitHub Release |
83 | 16 | uses: ./.github/actions/create-github-release |
84 | 17 | with: |
85 | | - milestone: ${{ needs.build-and-stage-release.outputs.version }} |
| 18 | + milestone: "0.21.0" |
86 | 19 | token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} |
0 commit comments