* [feat]: implement installation verification across services #156
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
TZ: Asia/Shanghai | |
GO_VERSION: '1.23' | |
permissions: write-all | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
check-latest: true | |
- name: install task | |
run: | | |
echo "install task" | |
go install github.com/go-task/task/v3/cmd/task@latest | |
- name: install upx | |
uses: crazy-max/ghaction-upx@v3 | |
with: | |
install-only: true | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Publish .deb & .rpm to Gemfury | |
env: | |
FURY_TOKEN: ${{ secrets.FURY_TOKEN }} | |
run: | | |
for filename in dist/*.deb; do | |
if [[ "$filename" == *"arm"* ]]; then | |
echo "Skipping $filename" | |
continue | |
fi | |
echo "Pushing $filename to apt repository" | |
curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ | |
curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ | |
done | |
for filename in dist/*.rpm; do | |
if [[ "$filename" == *"arm"* ]]; then | |
echo "Skipping $filename" | |
continue | |
fi | |
echo "Pushing $filename to rpm repository" | |
curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ | |
curl -F package=@$filename https://${FURY_TOKEN}@push.fury.io/qucheng/ | |
done | |
- name: "Upload checksums.txt" | |
uses: actions/upload-artifact@v4 | |
with: { name: checksums.txt, path: dist/checksums.txt } | |
Changelog: | |
name: "Changelog" | |
needs: release | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: master | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
check-latest: true | |
- name: install task | |
run: | | |
echo "install task" | |
go install github.com/go-task/task/v3/cmd/task@latest | |
- name: "download checksums.txt" | |
uses: actions/download-artifact@v4 | |
with: { name: checksums.txt, path: dist } | |
- run: ./hack/scripts/gentap.sh | |
- name: Build docs | |
run: | | |
task godoc | |
- name: Publish docs | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
publish_dir: ./docs | |
- run: git fetch --prune --prune-tags | |
- run: git tag -l 'v*' | |
- run: ./hack/scripts/changelog.sh > CHANGELOG.md | |
- name: fetch current version | |
id: get-current-tag | |
uses: actions-ecosystem/action-get-latest-tag@v1.6.0 | |
- uses: peter-evans/create-pull-request@v7 | |
id: cpr | |
with: | |
title: 'docs: updated CHANGELOG.md & docs for ${{steps.get-current-tag.outputs.tag }}' | |
commit-message: | | |
docs: updated CHANGELOG.md & docs | |
π€ add release changelog using rebot. | |
branch: create-pull-request/changelog-${{steps.get-current-tag.outputs.tag }} | |
delete-branch: true | |
labels: | | |
kind/doc | |
kind/bot | |
- name: Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: rebase |