Skip to content

Commit f1f43f9

Browse files
committed
fix: pr feedback
1 parent 1c0d386 commit f1f43f9

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

.github/workflows/release.yml

+28-9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
tags:
55
- "v*"
66

7+
permissions:
8+
contents: write
9+
packages: write
10+
711
jobs:
812
build:
913
strategy:
@@ -23,6 +27,9 @@ jobs:
2327
os: windows-latest
2428
runs-on: ${{ matrix.os }}
2529
steps:
30+
- name: Clean existing tags
31+
run: rm -rf .git/refs/tags/
32+
2633
- uses: actions/checkout@v3
2734
with:
2835
fetch-depth: 0
@@ -74,6 +81,9 @@ jobs:
7481
needs: build
7582
runs-on: ubuntu-latest
7683
steps:
84+
- name: Clean existing tags
85+
run: rm -rf .git/refs/tags/
86+
7787
- uses: actions/checkout@v3
7888
with:
7989
fetch-depth: 0
@@ -86,6 +96,8 @@ jobs:
8696
mv */yek-*.tar.gz ./
8797
8898
- name: Update Formula
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89101
run: |
90102
# Get version from tag
91103
VERSION=${GITHUB_REF#refs/tags/v}
@@ -100,19 +112,26 @@ jobs:
100112
sed -i "/url \".*yek-${target}.tar.gz\"/{n;s/sha256 \".*\"/sha256 \"${sha}\"/;}" Formula/yek.rb
101113
done
102114
103-
# Configure git
104-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
105-
git config --local user.name "github-actions[bot]"
115+
# Configure git with token-based auth
116+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
117+
git config --global user.name "github-actions[bot]"
118+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
106119
107-
# Commit and push Formula updates
120+
# Commit and push changes
108121
git add Formula/yek.rb
109-
git commit -m "chore: update formula for v${VERSION}"
110-
git push origin HEAD
122+
git commit -m 'chore: update formula for release ${VERSION}'
123+
git push origin HEAD:main
111124
112-
- name: Create GitHub Release
125+
- name: Create Release
113126
uses: softprops/action-gh-release@v1
114127
with:
115-
files: |
116-
yek-*.tar.gz
128+
files: yek-*.tar.gz
129+
generate_release_notes: true
117130
env:
118131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
133+
- name: Cleanup tags
134+
run: |
135+
git fetch --prune --prune-tags
136+
git tag -l | xargs -r git tag -d
137+
git fetch --tags

CHANGELOG.md

-16
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,10 @@
88

99
### Bug Fixes
1010

11-
1211
### Other Changes
1312

1413
- ci: remove automatic script path updating
1514

16-
17-
## [0.7.1] - 2025-01-19
18-
19-
### Features
20-
21-
- feat: implement tag-based release workflow
22-
23-
### Bug Fixes
24-
25-
26-
### Other Changes
27-
28-
- ci: remove automatic script path updating
29-
30-
3115
All notable changes to this project will be documented in this file.
3216

3317
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

0 commit comments

Comments
 (0)