Skip to content

Commit

Permalink
Simplify CI: Move UPX compression and artifact upload to release.yml
Browse files Browse the repository at this point in the history
- Cleaned up ci.yml for better readability.
  • Loading branch information
derektata committed Aug 20, 2024
1 parent 4e1340b commit 08d87d7
Showing 1 changed file with 19 additions and 31 deletions.
50 changes: 19 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,31 @@
name: CI

on:
on:
pull_request:
types: [synchronize, reopened, closed]
push:
branches:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'

- name: Install UPX
run: sudo apt-get install -y upx

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
${{ github.workspace }}/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build and compress binaries
run: make build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: build/
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
${{ github.workspace }}/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

0 comments on commit 08d87d7

Please sign in to comment.