mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 12:41:45 +00:00
test: re-merge workflows into 'publish' for download-artifact
This commit is contained in:
parent
1dc9c2f40b
commit
7bad3a40be
@ -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: Build
|
name: Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -23,7 +23,7 @@ jobs:
|
|||||||
run: sed -En 's/^go (.*)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
|
run: sed -En 's/^go (.*)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "${{ env.GO_VERSION }}"
|
go-version: "${{ env.GO_VERSION }}"
|
||||||
|
|
||||||
@ -39,3 +39,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ProxySwitcher
|
name: ProxySwitcher
|
||||||
path: build/*
|
path: build/*
|
||||||
|
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
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
|
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@ -1,25 +0,0 @@
|
|||||||
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