|
30 | 30 | JAVA_DISTRO: 'zulu'
|
31 | 31 |
|
32 | 32 | jobs:
|
33 |
| - precheck: |
34 |
| - name: Precheck |
35 |
| - runs-on: ubuntu-latest |
36 |
| - outputs: |
37 |
| - VERSION: ${{ steps.vars.outputs.VERSION }} |
38 |
| - steps: |
39 |
| - - name: Checkout |
40 |
| - uses: actions/checkout@v4 |
41 |
| - |
42 |
| - - name: Cancel previous run |
43 |
| - |
44 |
| - with: |
45 |
| - access_token: ${{ secrets.GITHUB_TOKEN }} |
46 |
| - |
47 | 33 | release:
|
48 | 34 | name: Release
|
49 |
| - needs: [precheck] |
50 | 35 | runs-on: ubuntu-latest
|
51 | 36 | steps:
|
52 | 37 | - uses: actions/checkout@v4
|
53 | 38 | with:
|
54 | 39 | fetch-depth: 0
|
55 | 40 |
|
| 41 | + - name: Cancel previous run |
| 42 | + |
| 43 | + with: |
| 44 | + access_token: ${{ secrets.GITHUB_TOKEN }} |
| 45 | + |
56 | 46 | - name: Set up Java
|
57 | 47 | uses: actions/setup-java@v4
|
58 | 48 | with:
|
59 | 49 | java-version: ${{ env.JAVA_VERSION }}
|
60 | 50 | distribution: ${{ env.JAVA_DISTRO }}
|
61 | 51 | cache: gradle
|
62 | 52 |
|
63 |
| - - name: Set release version |
| 53 | + - name: Version |
| 54 | + id: vars |
| 55 | + shell: bash |
64 | 56 | run: |
|
65 |
| - VERSION=${{ github.event.inputs.version }} |
66 |
| - echo $VERSION > VERSION |
| 57 | + echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT |
| 58 | + echo ${{ github.event.inputs.version }} > VERSION |
67 | 59 | git add VERSION
|
68 |
| - sed -i -e "s/^\:project-version\:\ .*/:project-version: ${{ needs.precheck.outputs.VERSION }}/g" README.adoc |
69 |
| - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" |
70 |
| - git config --global user.name "GitHub Action" |
71 |
| - git commit -a -m "Releasing version $VERSION" |
| 60 | + sed -i -e "s/^\:project-version\:\ .*/:project-version: ${{ github.event.inputs.version }}/g" README.adoc |
| 61 | + git config --global user.email "${{ secrets.COMMIT_EMAIL }}" |
| 62 | + git config --global user.name "Andres Almiray" |
| 63 | + git commit -a -m "Releasing version ${{ github.event.inputs.version }}" |
72 | 64 | git push origin master
|
73 | 65 |
|
74 | 66 | - name: Deploy
|
|
0 commit comments