mirror of
https://github.com/ayflying/p2p.git
synced 2026-03-05 01:39:23 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e856543529 | ||
|
|
4bed53dc16 |
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
@@ -14,15 +14,18 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
# runs-on指定了运行作业的虚拟机环境类型
|
||||||
|
# 即使使用container,runs-on仍然是必要的配置
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# 在runner上运行golang容器
|
||||||
|
container:
|
||||||
|
# 使用最新版本的golang镜像,无需指定具体版本号
|
||||||
|
image: golang:latest-alpine
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Go
|
# Go environment is already provided by the container image
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.24.x'
|
|
||||||
|
|
||||||
- name: Install gf CLI
|
- name: Install gf CLI
|
||||||
run: |
|
run: |
|
||||||
@@ -39,7 +42,7 @@ jobs:
|
|||||||
run: gf build -ew -v "${{ github.ref_name }}"
|
run: gf build -ew -v "${{ github.ref_name }}"
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: p2p-${{ github.ref_name }}
|
name: p2p-${{ github.ref_name }}
|
||||||
path: |
|
path: |
|
||||||
@@ -47,13 +50,19 @@ jobs:
|
|||||||
|
|
||||||
release:
|
release:
|
||||||
needs: build
|
needs: build
|
||||||
|
# runs-on指定了运行作业的虚拟机环境类型
|
||||||
|
# 即使使用container,runs-on仍然是必要的配置
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# 在runner上运行golang容器
|
||||||
|
container:
|
||||||
|
# 使用最新版本的golang镜像,无需指定具体版本号
|
||||||
|
image: golang:latest-alpine
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: p2p-${{ github.ref_name }}
|
name: p2p-${{ github.ref_name }}
|
||||||
path: bin
|
path: bin
|
||||||
|
|||||||
Reference in New Issue
Block a user