Skip to content

Commit

Permalink
Fixing the release pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
can1357 committed Mar 3, 2024
1 parent 07f1cf1 commit 10bb35b
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 38 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 🔨 Build

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22"

- name: Build
run: go build -v .
30 changes: 0 additions & 30 deletions .github/workflows/go.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 🚀 Release

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22"

- name: Build
run: go build -v .

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ __debug_bin*
.DS_Store
*.i64
dev
.vscode
.vscode
build/
build.bat
14 changes: 7 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ before:

builds:
- main: ./main.go
binary: pmesh
id: pmesh
binary: pmesh
goos: [windows, linux, darwin]
goarch: [amd64, arm64]
env:
- CGO_ENABLED=0
goos: [ windows,linux,darwin ]
goarch: [ amd64,arm64 ]

archives:
- format: zip
id: pmesh
builds: [ pmesh ]
replacements:
darwin: macOS
id: pmesh
builds: [pmesh]
replacements:
darwin: macOS

checksum:
algorithm: sha256

0 comments on commit 10bb35b

Please sign in to comment.