|
9 | 9 | jobs: |
10 | 10 | release-please: |
11 | 11 | runs-on: ubuntu-latest |
| 12 | + permissions: |
| 13 | + pull-requests: write # Needed to create the release PR |
| 14 | + contents: write # Needed to generate the release |
| 15 | + |
| 16 | + outputs: |
| 17 | + release_created: ${{ steps.release.outputs.release_created }} |
| 18 | + prs_created: ${{ steps.release.outputs.prs_created }} |
| 19 | + pr_branch_name: ${{ steps.release.outputs.prs_created == 'true' && fromJSON(steps.release.outputs.pr).headBranchName || '' }} |
12 | 20 | steps: |
13 | | - - uses: cwaldren-ld/release-please-action@c20bc7716919838e71934160b59925db0b3e59af |
| 21 | + - uses: google-github-actions/release-please-action@v4 |
14 | 22 | id: release |
15 | 23 | with: |
16 | 24 | token: ${{ secrets.GITHUB_TOKEN }} |
| 25 | + target-branch: ${{ github.ref_name }} |
| 26 | + |
| 27 | + rockspec-info: |
| 28 | + needs: release-please |
| 29 | + uses: ./.github/workflows/rockspec-info.yml |
| 30 | + |
| 31 | + update-release-pr: |
| 32 | + needs: release-please |
| 33 | + if: ${{ needs.release-please.outputs.prs_created == 'true' }} |
| 34 | + runs-on: ubuntu-latest |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v4 |
| 37 | + - name: Update launchdarkly-server-sdk rockspec |
| 38 | + uses: ./.github/actions/update-versions |
| 39 | + with: |
| 40 | + package: launchdarkly-server-sdk |
| 41 | + branch: ${{ needs.release-please.outputs.pr_branch_name }} |
| 42 | + |
| 43 | + - name: Update launchdarkly-server-sdk-redis rockspec |
| 44 | + uses: ./.github/actions/update-versions |
| 45 | + with: |
| 46 | + package: launchdarkly-server-sdk-redis |
| 47 | + branch: ${{ needs.release-please.outputs.pr_branch_name }} |
| 48 | + |
| 49 | + publish-docs: |
| 50 | + permissions: |
| 51 | + contents: write # Needed to publish to Github Pages |
| 52 | + needs: release-please |
| 53 | + if: ${{ needs.release-please.outputs.release_created == 'true' }} |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v4 |
| 57 | + - name: Build documentation |
| 58 | + uses: ./.github/actions/build-docs |
| 59 | + |
| 60 | + - name: Publish docs |
| 61 | + uses: ./.github/actions/publish-docs |
| 62 | + with: |
| 63 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 64 | + |
| 65 | + publish-server: |
| 66 | + permissions: # Needed for access to the LuaRocks token |
| 67 | + id-token: write |
| 68 | + contents: read |
| 69 | + needs: [release-please, rockspec-info] |
| 70 | + if: ${{ needs.release-please.outputs.release_created == 'true' }} |
| 71 | + runs-on: ubuntu-latest |
| 72 | + steps: |
| 73 | + - uses: actions/checkout@v4 |
| 74 | + - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.2 |
| 75 | + name: 'Get LuaRocks token' |
| 76 | + with: |
| 77 | + aws_assume_role: ${{ vars.AWS_ROLE_ARN }} |
| 78 | + ssm_parameter_pairs: '/production/common/releasing/luarocks/token = LUAROCKS_API_TOKEN' |
| 79 | + - uses: ./.github/actions/publish |
| 80 | + name: Publish server package |
| 81 | + with: |
| 82 | + dry_run: 'false' |
| 83 | + rockspec: ${{ fromJSON(needs.rockspec-info.outputs.info).server }} |
| 84 | + |
| 85 | + publish-redis: |
| 86 | + permissions: # Needed for access to the LuaRocks token |
| 87 | + id-token: write |
| 88 | + contents: read |
| 89 | + needs: [ publish-server, rockspec-info ] |
| 90 | + runs-on: ubuntu-latest |
| 91 | + steps: |
| 92 | + - uses: actions/checkout@v4 |
| 93 | + - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.2 |
| 94 | + name: 'Get LuaRocks token' |
| 95 | + with: |
| 96 | + aws_assume_role: ${{ vars.AWS_ROLE_ARN }} |
| 97 | + ssm_parameter_pairs: '/production/common/releasing/luarocks/token = LUAROCKS_API_TOKEN' |
| 98 | + - uses: ./.github/actions/publish |
| 99 | + name: Publish redis package |
| 100 | + with: |
| 101 | + dry_run: 'false' |
| 102 | + rockspec: ${{ fromJSON(needs.rockspec-info.outputs.info).redis }} |
0 commit comments