-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.38 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (39 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Release
on:
push:
tags:
- "v*"
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: false
env:
VERSION: ${{ github.ref_name }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # create GitHub release and upload assets
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Pack source archive
run: |
git archive --prefix="anyhow-cpp-${VERSION}/" -o "anyhow-cpp-${VERSION}.tar.gz" HEAD
git archive --prefix="anyhow-cpp-${VERSION}/" -o "anyhow-cpp-${VERSION}.zip" HEAD
- name: Generate checksums
run: bash .github/workflows/scripts/checksum.sh "anyhow-cpp-${VERSION}.tar.gz" "anyhow-cpp-${VERSION}.zip"
- name: Extract release notes
run: bash .github/workflows/scripts/extract-changelog.sh "$VERSION" CHANGELOG.md > release_notes.md
- name: Create GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "$VERSION" --notes-file release_notes.md \
"anyhow-cpp-${VERSION}.tar.gz" \
"anyhow-cpp-${VERSION}.tar.gz.sha256" \
"anyhow-cpp-${VERSION}.zip" \
"anyhow-cpp-${VERSION}.zip.sha256"