Skip to content

Commit 6990db2

Browse files
authored
Refactor release workflow to remove GitHub CLI step
1 parent 18a51cc commit 6990db2

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: Release new version
2-
32
on:
43
workflow_dispatch:
54
inputs:
65
new_version:
76
description: 'Version to release'
87
required: true
98
type: string
10-
119
jobs:
1210
bump-version-and-release:
1311
runs-on: ubuntu-latest
@@ -16,49 +14,37 @@ jobs:
1614
uses: actions/checkout@v4
1715
with:
1816
fetch-depth: 0 # Fetch all history for proper release notes
19-
2017
- name: Show current version
2118
run: |
2219
echo "Current version is:"
2320
grep '^version=' library.properties || echo "Not found"
24-
2521
- name: Set up Git user
2622
run: |
2723
git config --global user.name "github-actions[bot]"
2824
git config --global user.email "github-actions[bot]@users.noreply.github.com"
29-
3025
- name: Bump library.properties version
3126
env:
3227
NEW_VERSION: ${{ github.event.inputs.new_version }}
3328
run: |
3429
sed -i "s/^version=.*/version=${NEW_VERSION}/" library.properties
35-
3630
- name: Bump library.json version
3731
env:
3832
NEW_VERSION: ${{ github.event.inputs.new_version }}
3933
run: |
4034
jq ".version = \"${NEW_VERSION}\"" library.json > tmp.json && mv tmp.json library.json
41-
4235
- name: Commit & push version bump
4336
env:
4437
NEW_VERSION: ${{ github.event.inputs.new_version }}
4538
run: |
4639
git add library.properties library.json
4740
git commit -m "Bump version to ${NEW_VERSION}" || echo "No changes to commit"
4841
git push
49-
5042
- name: Create and push tag
5143
env:
5244
NEW_VERSION: ${{ github.event.inputs.new_version }}
5345
run: |
5446
git tag "v${NEW_VERSION}"
5547
git push origin "v${NEW_VERSION}"
56-
57-
- name: Install GitHub CLI
58-
uses: actions/setup-gh@v2
59-
with:
60-
version: 'latest'
61-
6248
- name: Create GitHub Release with auto-generated notes
6349
env:
6450
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -67,4 +53,3 @@ jobs:
6753
--generate-notes \
6854
--repo "${{ github.repository }}" \
6955
--target "${{ github.sha }}"
70-

0 commit comments

Comments
 (0)