-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github action for auto build on release. Cache-dir description.
- Loading branch information
Showing
2 changed files
with
93 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,89 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
name: Release binaries | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
|
||
- name: Download dependencies | ||
run: go mod vendor | ||
- name: Pack vendor dir | ||
run: tar -czf yamusic-tui-vendor.tar.gz ./vendor | ||
- name: Upload vendor archive | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: yamusic-tui-vendor.tar.gz | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
body: "### ${{ github.ref }}" | ||
draft: true | ||
|
||
- name: Build linux-amd64 | ||
run: go build -trimpath -ldflags="-w -s" -o yamusic | ||
env: | ||
GOOS: linux | ||
GOARCH: amd64 | ||
- name: Upload linux-amd64 | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: yamusic | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
body: "### ${{ github.ref }}" | ||
draft: true | ||
|
||
- name: Build linux-amd64-nomedia | ||
run: go build -trimpath -ldflags="-w -s" -tags=nomedia -o yamusic-nomedia | ||
env: | ||
GOOS: linux | ||
GOARCH: amd64 | ||
- name: Upload linux-amd64-nomedia | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: yamusic-nomedia | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
body: "### ${{ github.ref }}" | ||
draft: true | ||
|
||
- name: Build windows-amd64 | ||
run: go build -trimpath -ldflags="-w -s" -o yamusic.exe | ||
env: | ||
GOOS: windows | ||
GOARCH: amd64 | ||
- name: Upload windows-amd64 | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: yamusic.exe | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
body: "### ${{ github.ref }}" | ||
draft: true | ||
|
||
- name: Build windows-amd64-nomedia | ||
run: go build -trimpath -ldflags="-w -s" -tags=nomedia -o yamusic-nomedia.exe | ||
env: | ||
GOOS: windows | ||
GOARCH: amd64 | ||
- name: Upload windows-amd64 | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: yamusic-nomedia.exe | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ github.ref }} | ||
body: "### ${{ github.ref }}" | ||
draft: true |
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