-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.53 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Release dPanel Router
on:
release:
types: [created]
workflow_dispatch:
jobs:
releases-matrix:
name: Release Matrix
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goarch: ["386", "amd64", "arm64"]
exclude:
# windows/386 and darwin/386 seems useless
- goarch: "386"
goos: windows
- goarch: "386"
goos: darwin
steps:
- name: Get Release Info
run: |
echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "OS_NAME=${{ matrix.goos }}" >> $GITHUB_ENV
- name: OS darwin
if: matrix.goos == 'darwin'
run: echo "OS_NAME=macOS" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "caddyserver/xcaddy"
version: "tags/v0.3.5"
file: "xcaddy_0.3.5_linux_amd64.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract tgz
uses: ihiroky/extract-action@v1
with:
file_path: xcaddy_0.3.5_linux_amd64.tar.gz
extract_dir: .
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
md5sum: false
goversion: 1.21.4
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
build_command: make build
binary_name: caddy
asset_name: "dpanel-router-${{ env.RELEASE_TAG }}-${{ env.OS_NAME }}-${{ matrix.goarch }}"