-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
99 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: release | ||
|
||
permissions: | ||
contents: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
|
||
push: | ||
branches: | ||
- "*" | ||
tags: | ||
- "*" | ||
|
||
workflow_dispatch: | ||
|
||
env: | ||
name: row | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
source: | ||
name: Build source tarball | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: true | ||
path: code | ||
|
||
- name: Determine filename-safe ref from GITHUB_REF_NAME | ||
run: echo ref="$(echo "${GITHUB_REF_NAME}" | sed -e 's/\//-/g')" >> "$GITHUB_ENV" | ||
|
||
- name: Copy source | ||
run: cp -R code "${name}-${ref}" | ||
|
||
- name: Remove .git | ||
run: rm -rf "${name}-${ref}/.git" && ls -laR "${name}-${ref}" | ||
|
||
- name: Tar/xz source | ||
run: tar -cvJf "${name}-${ref}.tar.xz" "${name}-${ref}" | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
name: source | ||
path: | | ||
*.tar.* | ||
release-notes: | ||
name: Extract release notes | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: true | ||
path: code | ||
|
||
- name: Write release-notes.md | ||
run: grep -P -m 2 -B 10000 "^## v*\d*\.\d*\.\d*" doc/src/release-notes.md | sed '$d' | tee "${GITHUB_WORKSPACE}/release-notes.md" | ||
working-directory: code | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
name: release-notes | ||
path: | | ||
release-notes.md | ||
publish: | ||
name: Publish [GitHub] | ||
needs: [release] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download artifacts | ||
uses: actions/[email protected] | ||
with: | ||
merge-multiple: true | ||
|
||
- name: Create release | ||
uses: softprops/[email protected] | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
files: | | ||
*.xz | ||
body_path: release-notes.md | ||
make_latest: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
## 0.1.0 (not yet released) | ||
|
||
* Initial release. | ||
|
||
## 0.0.0 |