Skip to content

Commit c10d9de

Browse files
committed
Building pipeline added
1 parent 0d4bfa9 commit c10d9de

2 files changed

Lines changed: 94 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Build EPIC
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
types: [ closed ]
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
repository-projects: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
21+
22+
steps:
23+
- name: Check out repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@v5
28+
with:
29+
go-version: '1.23.1'
30+
31+
- name: Build Windows binary
32+
run: |
33+
GOOS=windows GOARCH=amd64 go build -o EPIC.exe -ldflags "-w -s" -trimpath main.go
34+
35+
- name: Build Linux binary
36+
run: |
37+
GOOS=linux GOARCH=amd64 go build -o EPIC-linux-amd64 -ldflags "-w -s" -trimpath main.go
38+
39+
- name: Build macOS binary
40+
run: |
41+
GOOS=darwin GOARCH=arm64 go build -o EPIC-darwin-arm64 -ldflags "-w -s" -trimpath main.go
42+
43+
- name: List built binaries
44+
run: ls -la
45+
46+
- name: Delete existing tag and release
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
run: |
50+
gh release delete 1.1.1 --cleanup-tag --yes || echo "No release or tag found for 1.1.1"
51+
52+
- name: Create Release
53+
id: create_release
54+
uses: actions/create-release@v1
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
with:
58+
tag_name: 0.1.0
59+
release_name: EPIC 0.1.0
60+
body: |
61+
- Beta testing release!
62+
draft: false
63+
prerelease: false
64+
65+
- name: Upload Windows asset
66+
uses: actions/upload-release-asset@v1
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
upload_url: ${{ steps.create_release.outputs.upload_url }}
71+
asset_path: EPIC.exe
72+
asset_name: EPIC.exe
73+
asset_content_type: application/octet-stream
74+
75+
- name: Upload Linux asset
76+
uses: actions/upload-release-asset@v1
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
with:
80+
upload_url: ${{ steps.create_release.outputs.upload_url }}
81+
asset_path: EPIC-linux-amd64
82+
asset_name: EPIC-linux-amd64
83+
asset_content_type: application/octet-stream
84+
85+
- name: Upload macOS asset
86+
uses: actions/upload-release-asset@v1
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89+
with:
90+
upload_url: ${{ steps.create_release.outputs.upload_url }}
91+
asset_path: EPIC-darwin-arm64
92+
asset_name: EPIC-darwin-arm64
93+
asset_content_type: application/octet-stream

epic/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
// TODO:
99
// - Add README in project template
10+
// - Add table of contents in README
1011

1112
func main() {
1213
cmd.Run()

0 commit comments

Comments
 (0)