forked from sickmartian/quick_simplenote
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Use GitHub Actions for version bumping and release creation
Update the release workflow to leverage GitHub Actions for version bumping and release creation. The workflow now uses `mathieudutour/github-tag-action` and `ncipollo/release-action` to simplify the process and ensure consistency. This change removes the need for additional dependencies and configuration, streamlines the release process, and improves overall maintainability.
- Loading branch information
Showing
1 changed file
with
30 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -14,30 +14,36 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Extract current version | ||
id: extract_version | ||
run: | | ||
# Extract the current version from the VERSION file | ||
VERSION=$(cat VERSION) | ||
echo "Current version: $VERSION" | ||
echo "::set-output name=current_version::$VERSION" | ||
- uses: paulhatch/[email protected] | ||
id: generate-version | ||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
tag_prefix: "st4-" | ||
major_pattern: "(MAJOR)" | ||
minor_pattern: "(MINOR)" | ||
version_format: "st4-${major}.${minor}.${patch}" | ||
|
||
- name: Create Release | ||
id: create-release | ||
uses: undergroundwires/[email protected] | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
git-token: ${{ secrets.ACTION_TOKEN }} | ||
release-token: ${{ secrets.ACTION_TOKEN }} | ||
tag_prefix: "st4-" | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
|
||
# - name: Set up Git | ||
# run: | | ||
# git config --global user.name "github-actions[bot]" | ||
# git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
|
||
# - uses: paulhatch/[email protected] | ||
# id: generate-version | ||
# with: | ||
# tag_prefix: "st4-" | ||
# major_pattern: "(MAJOR)" | ||
# minor_pattern: "(MINOR)" | ||
# version_format: "st4-${major}.${minor}.${patch}" | ||
|
||
# - name: Create Release | ||
# id: create-release | ||
# uses: undergroundwires/[email protected] | ||
# with: | ||
# git-token: ${{ secrets.ACTION_TOKEN }} | ||
# release-token: ${{ secrets.ACTION_TOKEN }} |