Update version #13
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: release-tags | |
on: | |
# push: | |
# branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
push: | |
tags: | |
- "*" | |
jobs: | |
linux-part: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Build Changelog" | |
id: build_changelog | |
uses: mikepenz/release-changelog-builder-action@v4 | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
with: | |
commitMode: true | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21.x" | |
- name: Install system dependencies | |
run: sudo apt-get install -y gcc-mingw-w64-x86-64 gcc-aarch64-linux-gnu | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Build | |
run: | | |
bash scripts/build.sh linux amd64 | |
bash scripts/build.sh linux arm64 | |
bash scripts/build.sh windows amd64 | |
- name: echo changelog | |
run: echo ${{steps.build_changelog.outputs.changelog}} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
with: | |
body: ${{steps.build_changelog.outputs.changelog}} | |
fail_on_unmatched_files: true | |
prerelease: false | |
files: build/* | |
# - name: info | |
# run: echo ${{ steps.Release.outputs.url }} ${{ steps.Release.outputs.upload_url }} ${{ steps.Release.outputs.id }} | |
mac-part: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: macos-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21.x" | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Build | |
run: | | |
bash scripts/build.sh darwin arm64 | |
bash scripts/build.sh darwin amd64 | |
- name: Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
overwrite: true | |
file_glob: true | |
file: build/* |