Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a GitHub action for release #1

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'

jobs:
release:
runs-on: ubuntu-latest
name: Build workflow
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- name: Build binaries
run: |
GOOS=darwin GOARCH=arm64 go build -o dictcc_arm64 main.go
GOOS=darwin GOARCH=amd64 go build -o dictcc_amd64 main.go
- name: Bundle workflow
run: |
mkdir dist
zip dist/Dict.cc.alfredworkflow dictcc_arm64 dictcc_amd64 assets/info.plist assets/icon.png
- name: Create or update the GitHub release
uses: softprops/action-gh-release@v1
with:
files: dist/Dict.cc.alfredworkflow