mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 04:31:45 +00:00
separate build and release steps
This commit is contained in:
parent
7b565f82f0
commit
1dc9c2f40b
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@ -1,7 +1,7 @@
|
||||
# This workflow will build a golang project
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
||||
|
||||
name: Go
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -34,10 +34,8 @@ jobs:
|
||||
- name: Build project
|
||||
run: go build -o build/ -v ./...
|
||||
|
||||
- name: Create release with asset
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create "${{ github.ref_name }}" \
|
||||
--title "Release ${{ github.ref_name }}" \
|
||||
build/ProxySwitcher.exe
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ProxySwitcher
|
||||
path: build/*
|
||||
|
25
.github/workflows/release.yml
vendored
Normal file
25
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ProxySwitcher
|
||||
|
||||
- name: Create release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create "${{ github.event.workflow_run.head_ref }}" \
|
||||
--title "Release ${{ github.event.workflow_run.head_ref }}" \
|
||||
ProxySwitcher
|
Loading…
Reference in New Issue
Block a user