2024-04-03 22:15:26 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
needs: [test]
|
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
container:
|
2024-04-13 11:31:41 +00:00
|
|
|
image: luzifer/gh-arch-env
|
2024-04-03 22:15:26 +00:00
|
|
|
env:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
GOPATH: /go
|
|
|
|
|
2024-04-13 12:13:36 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2024-04-03 22:15:26 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
show-progress: false
|
|
|
|
|
|
|
|
- name: Marking workdir safe
|
|
|
|
run: |
|
|
|
|
git config --global --add safe.directory /__w/twitch-bot/twitch-bot
|
|
|
|
|
|
|
|
- name: Build release
|
|
|
|
run: make publish
|
|
|
|
|
|
|
|
- name: Extract changelog
|
|
|
|
run: 'awk "/^#/ && ++c==2{exit}; /^#/f" "History.md" | tail -n +2 >release_changelog.md'
|
|
|
|
|
|
|
|
- name: Update stable branch
|
|
|
|
run: |
|
|
|
|
git branch -f stable ${GITHUB_SHA}
|
|
|
|
git push -f origin stable
|
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
artifacts: '.build/*'
|
|
|
|
bodyFile: release_changelog.md
|
|
|
|
draft: false
|
|
|
|
generateReleaseNotes: false
|
|
|
|
|
|
|
|
...
|