Skip to content

Commit 239db5b

Browse files
committed
WIP Continuous release
1 parent 7d88e4f commit 239db5b

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

Diff for: .github/workflows/publish.yaml

+29-10
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,38 @@ on:
77

88
jobs:
99
webpage:
10-
name: Update webpage
10+
name: prepare release
1111
runs-on: ubuntu-latest
12+
permissions:
13+
# write permission is required to create a github release
14+
contents: write
1215
steps:
1316
- name: Checkout
1417
uses: actions/checkout@v4
1518
with:
16-
fetch-depth: 0
17-
ref: release
18-
- name: Configure git
19+
ref: master
20+
- name: Create archive
21+
id: archive
1922
run: |
20-
git config user.name github-actions
21-
git config user.email [email protected]
22-
- name: Merge master into release
23-
run: git merge --no-edit origin/master
24-
- name: Push
25-
run: git push
23+
TAG="v0.20" # FIXME
24+
REPOSITORY_NAME="${GITHUB_REPOSITORY#*/}"
25+
PREFIX="${REPOSITORY_NAME}-${TAG:1}"
26+
ARCHIVE="${PREFIX}.tar.gz"
27+
28+
echo "tgz=${ARCHIVE}" >> $GITHUB_OUTPUT
29+
30+
git archive --format=tar.gz --prefix="${PREFIX}/" -o "$ARCHIVE" "${TAG}"
31+
- name: Prepare bzlmod / WORKSPACE snippets
32+
run: .github/workflows/prepare_snippets.sh ${{ steps.archive.outputs.tgz }} > release_notes.txt
33+
- name: Generate changelog
34+
env:
35+
GITHUB_REF_NAME: 'v0.20' # FIXME
36+
run: |
37+
printf '\n-----\n\n' >> release_notes.txt
38+
awk -f .github/workflows/changelog.awk CHANGELOG.md >> release_notes.txt
39+
- name: Create draft release
40+
env:
41+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
TAG: 'v0.20' # FIXME
43+
run: |
44+
gh release create --draft --notes-file release_notes.txt $TAG ${{ steps.archive.outputs.tgz }}

0 commit comments

Comments
 (0)