From 5c5a37836371fa1f986ac3e15fcfab869e156406 Mon Sep 17 00:00:00 2001 From: Magnus Kokk Date: Mon, 12 Feb 2024 18:49:53 +0200 Subject: [PATCH] Attempt github workflow again --- .github/workflows/ci.yml | 27 --------------------------- .github/workflows/release.yaml | 25 +++++++++++++++++++++++++ Makefile | 5 ----- 3 files changed, 25 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yaml delete mode 100644 Makefile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 26d9e7c..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: CI -on: - push: - branches: - - '**' - pull_request: - branches: - - '**' -jobs: - release: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 1.21 - - uses: go-semantic-release/action@v1 - with: - hooks: - - id: goreleaser - targets: - - linux_amd64 - - linux_arm64 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..a317abf --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +on: + release: + types: [created] + +permissions: + contents: write + packages: write + +jobs: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux] + goarch: [amd64, arm64] + steps: + - uses: actions/checkout@v4 + - uses: wangyoucao577/go-release-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + binary_name: "sway-fader" + extra_files: LICENSE README.md diff --git a/Makefile b/Makefile deleted file mode 100644 index 5639c38..0000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: build -.DEFAULT_GOAL := build - -build: - CGO_ENABLED=false GOARCH=amd64 GOOS=linux go build -o sway-fader main.go