-
Notifications
You must be signed in to change notification settings - Fork 35
41 lines (31 loc) · 1020 Bytes
/
go.yml
File metadata and controls
41 lines (31 loc) · 1020 Bytes
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
name: Go
on: [pull_request, push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Remove old artifacts
run: rm -rf artifacts/deploy
- name: Build
run: make all
- name: Concat artifacts yaml
if: ${{ github.event_name == 'push' }}
run: |
echo ${GITHUB_REF##*/}
for i in artifacts/deploy/*; do cat $i >> artifacts/deploy/all.yaml; done;
- id: git-branch
if: ${{ github.event_name == 'push' }}
run: |
echo "::set-output name=git-branch::$(echo ${GITHUB_REF##*/} | tr '[A-Z]' '[a-z]')"
- name: Publish to Dist Branch
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: dist
folder: artifacts/deploy
target-folder: ${{steps.git-branch.outputs.git-branch}}