Skip to content

Commit

Permalink
Merge pull request #10 from eastarpen/release-workflow
Browse files Browse the repository at this point in the history
Publish releases workflow #9
  • Loading branch information
xmdhs authored Oct 1, 2023
2 parents f4c40ef + 1dc9385 commit 568d9f8
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build And Publish Releases

# https://github.com/softprops/action-gh-release/issues/236#issuecomment-1150530128
permissions:
contents: write

on:
# Allow mannual trigger
workflow_dispatch:
# Trigger on push new tag
push:
tags:
- "v*.*.*"

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile
uses: crazy-max/ghaction-xgo@v3
with:
xgo_version: latest
go_version: latest
dest: dist
prefix: clash2singbox
targets: windows/386,windows/amd64,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/arm64,darwin/amd64
# Show less information
v: false
x: false
race: false
ldflags: -s -w
buildmode: default
trimpath: true

- name: Publish GitHub Releases
uses: softprops/action-gh-release@v1
with:
name: "clash2singbox ${{ github.ref_name }}"
files: |
./dist/*
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 568d9f8

Please sign in to comment.