Skip to content
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
4 changes: 4 additions & 0 deletions .github/workflows/check_pr_release_notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
branches: [ master ]

concurrency:
group: release-notes-check-${{ github.ref }}
cancel-in-progress: true

jobs:
check-release-notes:
runs-on: ubuntu-latest
Expand Down
24 changes: 7 additions & 17 deletions .github/workflows/release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
Default value: latest tag. Syntax: "v[0-9]+.[0-9]+.[0-9]+".
required: false

permissions:
contents: write
issues: read
pull-requests: read

jobs:
release-draft:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,28 +79,13 @@ jobs:
script: |
const tag = process.env.TAG_NAME;
const ref = `refs/tags/${tag}`;
const sha = context.sha; // The SHA of the commit to tag
const tagMessage = `${tag} released by GitHub Action`;

const tagObject = await github.rest.git.createTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: tag,
message: tagMessage,
object: sha,
type: 'commit',
tagger: {
name: context.actor,
email: `${context.actor}@users.noreply.github.com`,
date: new Date().toISOString()
}
});
const sha = context.sha;

await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: ref,
sha: tagObject.data.sha
sha: sha
});

console.log(`Tag created: ${tag}`);
Expand Down