mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-27 05:01: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
|
# 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
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
||||||
|
|
||||||
name: Go
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -34,10 +34,8 @@ jobs:
|
|||||||
- name: Build project
|
- name: Build project
|
||||||
run: go build -o build/ -v ./...
|
run: go build -o build/ -v ./...
|
||||||
|
|
||||||
- name: Create release with asset
|
- name: Upload artifact
|
||||||
env:
|
uses: actions/upload-artifact@v4
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
run: |
|
name: ProxySwitcher
|
||||||
gh release create "${{ github.ref_name }}" \
|
path: build/*
|
||||||
--title "Release ${{ github.ref_name }}" \
|
|
||||||
build/ProxySwitcher.exe
|
|
||||||
|
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