Skip to content

Commit

Permalink
Merge pull request #12 from ed-asriyan/release-workflow
Browse files Browse the repository at this point in the history
Create release workflow
  • Loading branch information
fangdingjun authored Jun 28, 2024
2 parents 880a3c1 + 6364302 commit 7bc88c6
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/cd-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CD | Release

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

jobs:
build:
name: Build & Release
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- arm64
- amd64
os:
- darwin
- linux
- windows
env:
artifact_name: sniproxy-${{ matrix.os }}-${{ matrix.arch }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download dependencies
run: go mod download

- name: Build
run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -v -o ${{ env.artifact_name }}

- name: Upload executable as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
path: ${{ env.artifact_name }}

- name: Create a release
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.artifact_name }}
draft: true
allowUpdates: true

0 comments on commit 7bc88c6

Please sign in to comment.