Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add goreleaser #921

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9e955a8
feat: add goreleaser
vedantmgoyal9 Jan 23, 2025
dea6ca6
fix(ci/goreleaser): remove steps with empty `run` field
vedantmgoyal9 Jan 23, 2025
729abda
ci: fix condition and don't release if cache was hit
vedantmgoyal9 Jan 23, 2025
b65e2c4
fix(ci): goreleaser needs `fetch-depth: 0` to work
vedantmgoyal9 Jan 23, 2025
78e7642
[goreleaser] several fixes and improvements to config and ci
vedantmgoyal9 Jan 23, 2025
94d670e
ci(goreleaser): don't build windows until msi is fixed
vedantmgoyal9 Jan 23, 2025
9488378
fix(goreleaser): app bundle embedding thin binary instead of fat binary
vedantmgoyal9 Jan 23, 2025
b27bb03
concurrency
vedantmgoyal9 Jan 23, 2025
eb31a4f
build portables for windows (msi is still is disabled)
vedantmgoyal9 Jan 23, 2025
b755d72
test msi again with wix 5.0.2
vedantmgoyal9 Jan 23, 2025
a32ffbc
install wix v5 in ci instead of goreleaser before hooks
vedantmgoyal9 Jan 23, 2025
75071cd
ci: fix windows cache restore on linux
vedantmgoyal9 Jan 23, 2025
3e7ca47
disable msi, needs work at goreleaser side
vedantmgoyal9 Jan 23, 2025
d2d6760
update according to new changes
vedantmgoyal9 Jan 24, 2025
46a93ef
install wix extensions globally
vedantmgoyal9 Jan 24, 2025
52d4398
🤦🏻‍♂️
vedantmgoyal9 Jan 24, 2025
5977c19
update
vedantmgoyal9 Jan 24, 2025
872355c
some fixes related to msi
vedantmgoyal9 Jan 24, 2025
f9aca89
try one more time 😤
vedantmgoyal9 Jan 25, 2025
0d7c948
Apply suggestions from code review
vedantmgoyal9 Jan 25, 2025
33a887a
😭🤧
vedantmgoyal9 Jan 25, 2025
ec4535b
Update workflow name to 'Release'
vedantmgoyal9 Jan 26, 2025
e2b0c56
Merge branch 'main' into main
vedantmgoyal9 Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: GoReleaser
vedantmgoyal9 marked this conversation as resolved.
Show resolved Hide resolved
on:
push:
branches: [ main ]
tags:
- 'v*.*.*'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
concurrency:
group: goreleaser-${{ github.event_name }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
discussions: write
strategy:
matrix:
include:
- os: macos-latest
cache-subdir: darwin
secondary_target: x86_64-apple-darwin
# - os: ubuntu-latest
# target: x86_64-unknown-linux-gnu
# partial-by: target
# - os: ubuntu-24.04-arm
# target: aarch64-unknown-linux-gnu
# partial-by: target
- os: windows-latest
cache-subdir: windows
secondary_target: aarch64-pc-windows-msvc
fail-fast: false
outputs:
cache-hit: ${{ steps.cache-check.outputs.cache-hit }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: dist/${{ matrix.cache-subdir || matrix.target }}
key: goreleaser-${{ matrix.target || matrix.os }}-${{ github.sha }}
enableCrossOsArchive: ${{ matrix.os == 'windows-latest' }}
lookup-only: true
fail-on-cache-miss: false
id: cache-check
- if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
run: rustup target add ${{ matrix.secondary_target }}
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && steps.cache-check.outputs.cache-hit != 'true'
uses: goreleaser/[email protected]
with:
distribution: goreleaser-pro
version: nightly
args: release --clean --split # --partial-by ${{ matrix.partial-by || 'goos' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/v'))) && steps.cache-check.outputs.cache-hit != 'true'
uses: goreleaser/[email protected]
with:
distribution: goreleaser-pro
version: nightly
args: release --clean --split --nightly # --partial-by ${{ matrix.partial-by || 'goos' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
release:
# skip if cache exists for same commit, since we probably already released
if: needs.build.outputs.cache-hit != 'true'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
key: goreleaser-macos-latest-${{ github.sha }}
path: dist/darwin
fail-on-cache-miss: true
- uses: actions/cache@v4
with:
key: goreleaser-windows-latest-${{ github.sha }}
path: dist/windows
fail-on-cache-miss: true
# - uses: actions/cache@v4
# with:
# key: goreleaser-x86_64-unknown-linux-gnu-${{ github.sha }}
# path: dist/x86_64-unknown-linux-gnu
# fail-on-cache-miss: true
# - uses: actions/cache@v4
# with:
# key: goreleaser-aarch64-unknown-linux-gnu-${{ github.sha }}
# path: dist/aarch64-unknown-linux-gnu
# fail-on-cache-miss: true
- uses: goreleaser/[email protected]
with:
distribution: goreleaser-pro
version: nightly
args: continue --merge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
# macos notarization env vars
190 changes: 0 additions & 190 deletions .github/workflows/nightly.yml

This file was deleted.

Loading
Loading