|
9 | 9 | required: true
|
10 | 10 | type: "string"
|
11 | 11 |
|
12 |
| -env: |
13 |
| - # TODO: Use different token |
14 |
| - GH_TOKEN: ${{ secrets.MERGE_UP_TOKEN }} |
15 |
| - GIT_AUTHOR_NAME: "DBX PHP Release Bot" |
16 |
| - GIT_AUTHOR_EMAIL: "[email protected]" |
17 |
| - |
18 | 12 | jobs:
|
19 | 13 | prepare-release:
|
| 14 | + environment: release |
20 | 15 | name: "Prepare release"
|
21 | 16 | runs-on: ubuntu-latest
|
| 17 | + permissions: |
| 18 | + id-token: write |
| 19 | + contents: write |
22 | 20 |
|
23 | 21 | steps:
|
24 | 22 | - name: "Create release output"
|
25 | 23 | run: echo '🎬 Release process for version ${{ inputs.version }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY
|
26 | 24 |
|
| 25 | + - name: "Create temporary app token" |
| 26 | + uses: actions/create-github-app-token@v1 |
| 27 | + id: app-token |
| 28 | + with: |
| 29 | + app-id: ${{ vars.APP_ID }} |
| 30 | + private-key: ${{ secrets.APP_PRIVATE_KEY }} |
| 31 | + |
| 32 | + - name: "Store GitHub token in environment" |
| 33 | + run: echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV" |
| 34 | + shell: bash |
| 35 | + |
27 | 36 | - uses: actions/checkout@v4
|
28 | 37 | with:
|
29 | 38 | submodules: true
|
@@ -51,24 +60,22 @@ jobs:
|
51 | 60 | # Preliminary checks done - commence the release process
|
52 | 61 | #
|
53 | 62 |
|
54 |
| - - name: "Set git author information" |
55 |
| - run: | |
56 |
| - git config user.name "${GIT_AUTHOR_NAME}" |
57 |
| - git config user.email "${GIT_AUTHOR_EMAIL}" |
| 63 | + - name: "Set up drivers-github-tools" |
| 64 | + uses: mongodb-labs/drivers-github-tools/setup@v2 |
| 65 | + with: |
| 66 | + aws_role_arn: ${{ secrets.AWS_ROLE_ARN }} |
| 67 | + aws_region_name: ${{ vars.AWS_REGION_NAME }} |
| 68 | + aws_secret_id: ${{ secrets.AWS_SECRET_ID }} |
58 | 69 |
|
59 | 70 | # Create draft release with release notes
|
60 | 71 | - name: "Create draft release"
|
61 | 72 | run: echo "RELEASE_URL=$(gh release create ${{ inputs.version }} --target ${{ github.ref_name }} --title "${{ inputs.version }}" --generate-notes --draft)" >> "$GITHUB_ENV"
|
62 | 73 |
|
63 | 74 | # This step creates the signed release tag
|
64 | 75 | - name: "Create release tag"
|
65 |
| - uses: mongodb-labs/drivers-github-tools/garasign/git-sign@v1 |
| 76 | + uses: mongodb-labs/drivers-github-tools/git-sign@v2 |
66 | 77 | with:
|
67 |
| - command: "git tag -m 'Release ${{ inputs.version }}' -s --local-user=${{ vars.GPG_KEY_ID }} ${{ inputs.version }}" |
68 |
| - garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }} |
69 |
| - garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }} |
70 |
| - artifactory_username: ${{ secrets.ARTIFACTORY_USER }} |
71 |
| - artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }} |
| 78 | + command: "git tag -m 'Release ${{ inputs.version }}' -s --local-user=${{ env.GPG_KEY_ID }} ${{ inputs.version }}" |
72 | 79 |
|
73 | 80 | # TODO: Manually merge using ours strategy. This avoids merge-up pull requests being created
|
74 | 81 | # Process is:
|
|
0 commit comments