mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-12-24 11:51:13 +08:00
76 lines
2.0 KiB
YAML
76 lines
2.0 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
os-arch: [
|
|
kubevpn-darwin-amd64,
|
|
kubevpn-darwin-arm64,
|
|
kubevpn-windows-amd64.exe,
|
|
kubevpn-windows-arm64.exe,
|
|
kubevpn-windows-386.exe,
|
|
kubevpn-linux-amd64,
|
|
kubevpn-linux-arm64,
|
|
kubevpn-linux-386,
|
|
]
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.17
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: Release ${{ github.ref }}
|
|
body: |
|
|
Changes in this Release
|
|
- First Change
|
|
- Second Change
|
|
draft: false
|
|
prerelease: false
|
|
|
|
- name: Collect Release Info
|
|
run: |
|
|
echo "${{ steps.create_release.outputs.upload_url }}" >> UPLOAD_URL
|
|
echo ${{ env.RELEASE_VERSION }} >> RELEASE_VERSION
|
|
git reset --hard
|
|
|
|
- name: Upload RELEASE_VERSION
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: RELEASE_VERSION
|
|
path: RELEASE_VERSION
|
|
|
|
- name: Upload UPLOAD_URL
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: UPLOAD_URL
|
|
path: UPLOAD_URL
|
|
|
|
- name: Build kubevpn-all-arch
|
|
run: make all
|
|
|
|
- name: Upload Release Asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ${{ matrix.os-arch }}
|
|
asset_name: ${{ matrix.os-arch }}
|
|
asset_content_type: application/octet-stream
|