Skip to content

Streamline release process by not explicitly creating a tag in create_draft_release.yml #7024

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 3 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/create_draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ jobs:
actions: read # read secrets
issues: write # change milestones
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Have to use external token with explicit workflow permissions because we are creating
# a release from an arbitrary SHA. For "reasons", the built-in token does not _always_
# work in that scenario, so using an external token is required. See issue
# https://github.com/cli/cli/issues/9514 for more details.
GITHUB_TOKEN: "${{ secrets.GH_EXTERNAL_TOKEN }}"
AZURE_DEVOPS_TOKEN: "${{ secrets.AZURE_DEVOPS_TOKEN }}"

steps:
Expand Down Expand Up @@ -98,17 +102,13 @@ jobs:
env:
Version: ${{steps.versions.outputs.full_version}}

- name: "Create and push git tag"
run: |
git tag "v${{steps.versions.outputs.full_version}}"
git push origin "v${{steps.versions.outputs.full_version}}"

- name: Create Release
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v1.0.0
with:
draft: true
name: "${{steps.versions.outputs.full_version}}"
tag_name: "v${{steps.versions.outputs.full_version}}"
target_commitish: "${{steps.set_sha.outputs.sha}}"
prerelease: ${{steps.versions.outputs.isprerelease}}
body: ${{steps.release_notes.outputs.release_notes}}
fail_on_unmatched_files: true
Expand Down
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ download-single-step-artifacts:
rules:
- if: $DOTNET_PACKAGE_VERSION
when: on_success
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-prerelease)?$/' # Manually triggered as artifacts are from the Github release
when: manual
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-prerelease)?$/'
when: on_success # Artifacts are downloaded from the GitHub release, which creates the tag on publish
allow_failure: false
- when: on_success # Artifacts come from Azure pipeline, but as we already depend on build, we already have a delayed start
script:
Expand Down Expand Up @@ -147,8 +147,8 @@ download-serverless-artifacts:
rules:
- if: $DOTNET_PACKAGE_VERSION
when: on_success
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-prerelease)?$/' # Manually triggered as artifacts are from the Github release
when: manual
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-prerelease)?$/'
when: on_success # Artifacts are downloaded from the GitHub release, which creates the tag on publish
allow_failure: false
- when: delayed # Artifacts come from Azure pipeline, wait a reasonable time before polling
start_in: 15 minutes
Expand Down
Loading