build only on tags #37
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: build | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.21 | ||
- name: Make winres | ||
run: | | ||
go install github.com/tc-hib/go-winres@latest | ||
go-winres make | ||
- name: Build | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean --snapshot | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: MacOS app bundle | ||
run: go run mac-bundle/main.go | ||
- name: Create release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
- artifacts: "dist/go-yt-dlp_darwin_arm64/*,dist/go-yt-dlp_darwin_amd64_v1/*,dist/go-yt-dlp_windows_amd64_v1/go-yt-dlp.exe" | ||
- draft: true | ||
- name: Upload darwin arm64 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: go-yt-dlp darwin arm64 | ||
path: dist/go-yt-dlp_darwin_arm64/* | ||
- name: Upload darwin amd64 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: go-yt-dlp darwin amd64 | ||
path: dist/go-yt-dlp_darwin_amd64_v1/* | ||
- name: Upload windows amd64 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: go-yt-dlp windows amd64 | ||
path: dist/go-yt-dlp_windows_amd64_v1/go-yt-dlp.exe |