forked from datastack-net/dockerized
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.71 KB
/
release.yml
File metadata and controls
55 lines (55 loc) · 1.71 KB
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
52
53
54
55
name: Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- { name: linux-x86_64, GOOS: linux, GOARCH: amd64 }
- { name: mac-x86_64, GOOS: darwin, GOARCH: amd64 }
- { name: mac-arm64, GOOS: darwin, GOARCH: arm64 }
- { name: win64, GOOS: windows, GOARCH: amd64 }
- { name: win32, GOOS: windows, GOARCH: 386 }
steps:
- uses: actions/checkout@v2
- run: mkdir -p release/${{ matrix.target.name }}
- name: Copy static assets
run: cp -r apps/ .env *.md docker-compose.yml release/${{ matrix.target.name }}
- name: Build
env:
GO_VERSION: 1.17.8
GOOS: ${{ matrix.target.GOOS }}
GOARCH: ${{ matrix.target.GOARCH }}
run: |
bin/dockerized go build -o release/${{ matrix.target.name }}/bin/ .
ls -l release/${{ matrix.target.name }}/bin/dockerized*
- name: Zip
working-directory: release/${{ matrix.target.name }}
run: |
zip -r $GITHUB_WORKSPACE/release/${{ matrix.target.name }}.zip ./
- uses: actions/upload-artifact@v2
with:
name: release
path: release/*.zip
release:
name: Release
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: release
path: release
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx -p @semantic-release/changelog -p @semantic-release/git -p semantic-release semantic-release