generated from LontriTech/template-basic
-
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.32 KB
/
main.yaml
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
56
---
name: "Build and Publish"
run-name: "#${{ github.run_number }}-${{ github.run_attempt }}: ${{ github.sha }} by ${{ github.triggering_actor }}"
defaults:
run:
shell: bash
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
name: "Build Application Binary"
steps:
- name: "Checkout Code: REF ${{github.ref}}"
uses: actions/checkout@v4
id: checkout
with:
ref: ${{github.ref}}
persist-credentials : true
fetch-depth: 1
fetch-tags: false
clean: true
- name: "Setup Go Environment"
uses: actions/setup-go@v5.1.0
id: setup_go
with:
go-version-file: "./go.mod"
cache: true
cache-dependency-path: "./go.sum"
- name: "Run Build for ${{ runner.os }} ${{ runner.arch }}"
id: build
run: make build
- name: "Upload Build Artifact"
uses: actions/upload-artifact@v4.4.3
id: upload_artifact
with:
name: "${{ github.run_number }}-${{ github.run_attempt }}-${{ github.sha }}-${{ runner.os }}-${{ runner.arch }}"
path: "./dist/discordscaffolder"
if-no-files-found: "error"
retention-days: 7
compression-level: 9
overwrite: true
include-hidden-files: false