|
25 | 25 | java-version: ${{ env.JAVA_VERSION }} |
26 | 26 | distribution: ${{ env.JAVA_DISTRIBUTION }} |
27 | 27 |
|
| 28 | + - name: Install branch-github-actions |
| 29 | + uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + repository: BranchMetrics/branch-github-actions |
| 32 | + ref: master |
| 33 | + path: .branch-github-actions |
| 34 | + token: ${{ secrets.BRANCHLET_ACCESS_TOKEN_PUBLIC }} |
| 35 | + |
| 36 | + - name: Add INPUT_SHA env var |
| 37 | + run: | |
| 38 | + export INPUT_SHA=$(git rev-parse ${{ github.ref }}) |
| 39 | + echo "INPUT_SHA=`echo $INPUT_SHA`" >> $GITHUB_ENV |
| 40 | +
|
| 41 | + - name: Get next release version |
| 42 | + uses: actions/github-script@v7 |
| 43 | + id: next-version |
| 44 | + with: |
| 45 | + result-encoding: string |
| 46 | + script: | |
| 47 | + const getNextVersion = require('./.branch-github-actions/custom-scripts/next-version'); |
| 48 | + const nextVersion = await getNextVersion({ |
| 49 | + core, |
| 50 | + github, |
| 51 | + context, |
| 52 | + sha: process.env.INPUT_SHA, |
| 53 | + }); |
| 54 | + return nextVersion; |
| 55 | + env: |
| 56 | + INPUT_SHA: ${{ env.INPUT_SHA }} |
| 57 | + |
| 58 | + - name: Write version to files |
| 59 | + run: | |
| 60 | + ./deployment/write-versions.sh ${{ steps.next-version.outputs.result }} |
| 61 | +
|
28 | 62 | - name: Install dependencies |
29 | 63 | run: npm run ci |
30 | 64 |
|
@@ -67,44 +101,6 @@ jobs: |
67 | 101 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
68 | 102 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
69 | 103 |
|
70 | | - - name: Install branch-github-actions |
71 | | - if: ${{ github.ref == 'refs/heads/master' }} |
72 | | - uses: actions/checkout@v4 |
73 | | - with: |
74 | | - repository: BranchMetrics/branch-github-actions |
75 | | - ref: master |
76 | | - path: .branch-github-actions |
77 | | - token: ${{ secrets.BRANCHLET_ACCESS_TOKEN_PUBLIC }} |
78 | | - |
79 | | - - name: Add INPUT_SHA env var |
80 | | - if: ${{ github.ref == 'refs/heads/master' }} |
81 | | - run: | |
82 | | - export INPUT_SHA=$(git rev-parse ${{ github.ref }}) |
83 | | - echo "INPUT_SHA=`echo $INPUT_SHA`" >> $GITHUB_ENV |
84 | | -
|
85 | | - - name: Get next release version |
86 | | - if: ${{ github.ref == 'refs/heads/master' }} |
87 | | - uses: actions/github-script@v7 |
88 | | - id: next-version |
89 | | - with: |
90 | | - result-encoding: string |
91 | | - script: | |
92 | | - const getNextVersion = require('./.branch-github-actions/custom-scripts/next-version'); |
93 | | - const nextVersion = await getNextVersion({ |
94 | | - core, |
95 | | - github, |
96 | | - context, |
97 | | - sha: process.env.INPUT_SHA, |
98 | | - }); |
99 | | - return nextVersion; |
100 | | - env: |
101 | | - INPUT_SHA: ${{ env.INPUT_SHA }} |
102 | | - |
103 | | - - name: Write version to files |
104 | | - if: ${{ github.ref == 'refs/heads/master' }} |
105 | | - run: | |
106 | | - ./deployment/write-versions.sh ${{ steps.next-version.outputs.result }} |
107 | | -
|
108 | 104 | - name: Deploy updated builds to staging |
109 | 105 | if: ${{ github.ref == 'refs/heads/master' }} |
110 | 106 | id: build |
|
0 commit comments