Skip to content

Commit 655c477

Browse files
authored
feat(workflow): add release workflow (#6)
- Introduced a new GitHub Actions workflow (release.yml) to streamline the release process. - Allows manual triggering with a required releaseVersion input. - Steps include: - Checking out the repository with full history. - Creating a new annotated Git tag for the release. - Pushing the tag to the remote repository. - Generating a new GitHub release with the provided version, auto-generated release notes, and marking it as the latest. This enhancement ensures a consistent and automated approach for version tagging and release management.
1 parent b9a0d32 commit 655c477

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
releaseVersion:
5+
type: string
6+
description: New version for the release.
7+
required: true
8+
jobs:
9+
release:
10+
runs-on: ubuntu-24.04
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
fetch-depth: 0
18+
- name: Tag release
19+
shell: sh
20+
env:
21+
RELEASE_VERSION: ${{ inputs.releaseVersion }}
22+
run: |
23+
git tag -a "${RELEASE_VERSION}" -m "Release ${RELEASE_VERSION}"
24+
git push origin "${RELEASE_VERSION}"
25+
gh release create "${RELEASE_VERSION}" \
26+
--repo="$GITHUB_REPOSITORY" \
27+
--generate-notes \
28+
--latest \
29+
--title "${RELEASE_VERSION}"
30+
31+

0 commit comments

Comments
 (0)