-
Notifications
You must be signed in to change notification settings - Fork 266
Use checkout and tag actions from drivers-github-tools #1344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,21 +48,11 @@ jobs: | |
- name: "Create release output" | ||
run: echo '🎬 Release process for version ${{ inputs.version }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY | ||
|
||
- name: "Create temporary app token" | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
- name: "Generate token and checkout repository" | ||
uses: mongodb-labs/drivers-github-tools/secure-checkout@v2 | ||
with: | ||
app-id: ${{ vars.APP_ID }} | ||
private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
||
- name: "Store GitHub token in environment" | ||
run: echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV" | ||
shell: bash | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
token: ${{ env.GH_TOKEN }} | ||
app_id: ${{ vars.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
||
- name: "Store version numbers in env variables" | ||
run: | | ||
|
@@ -103,9 +93,10 @@ jobs: | |
run: echo "RELEASE_URL=$(gh release create ${{ inputs.version }} --target ${{ github.ref_name }} --title "${{ inputs.version }}" --notes-file release-message --draft)" >> "$GITHUB_ENV" | ||
|
||
- name: "Create release tag" | ||
uses: mongodb-labs/drivers-github-tools/git-sign@v2 | ||
uses: mongodb-labs/drivers-github-tools/tag-version@v2 | ||
with: | ||
command: "git tag -m 'Release ${{ inputs.version }}' -s --local-user=${{ env.GPG_KEY_ID }} ${{ inputs.version }}" | ||
version: ${{ inputs.version }} | ||
tag_message_template: 'Release ${VERSION}' | ||
|
||
# TODO: Manually merge using ours strategy. This avoids merge-up pull requests being created | ||
# Process is: | ||
|
@@ -114,12 +105,6 @@ jobs: | |
# 3. push next branch | ||
# 4. switch back to release branch, then push | ||
|
||
- name: "Push changes from release branch" | ||
run: git push | ||
|
||
- name: "Push release tag" | ||
run: git push origin ${{ inputs.version }} | ||
|
||
- name: "Set summary" | ||
run: | | ||
echo '🚀 Created tag and drafted release for version [${{ inputs.version }}](${{ env.RELEASE_URL }})' >> $GITHUB_STEP_SUMMARY | ||
|
@@ -146,21 +131,12 @@ jobs: | |
contents: write | ||
|
||
steps: | ||
- name: "Create temporary app token" | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.APP_ID }} | ||
private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
||
- name: "Store GitHub token in environment" | ||
run: echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV" | ||
shell: bash | ||
|
||
- uses: actions/checkout@v4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noted that this lines up with secure-checkout/action.yml. |
||
- name: "Generate token and checkout repository" | ||
uses: mongodb-labs/drivers-github-tools/secure-checkout@v2 | ||
with: | ||
app_id: ${{ vars.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
ref: refs/tags/${{ inputs.version }} | ||
token: ${{ env.GH_TOKEN }} | ||
|
||
# Sets the S3_ASSETS environment variable used later | ||
- name: "Set up drivers-github-tools" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume these two steps are handled entirely by the
git push origin --tags
line in tag-version/action.yml.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct