Skip to content

Commit

Permalink
ci(goreleaser,github): fix release build process
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Oct 18, 2023
1 parent 0c713c0 commit 2071aae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,32 @@ jobs:
with:
release-type: go
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3
if: ${{ steps.release_please.outputs.release_created }}
with:
fetch-depth: 0
- name: Fetch source

- name: Install/Cache dependencies
if: ${{ steps.release_please.outputs.release_created }}
id: git_fetch
run: git fetch --force --tags
id: cache_pkg_deps
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libevdev-dev desktop-file-utils gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev

- name: Setup Go
if: ${{ steps.release_please.outputs.release_created }}
id: setup_go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Install dependencies
if: ${{ steps.release_please.outputs.release_created }}
id: install_linux_deps
run: sudo apt-get install -y libevdev-dev desktop-file-utils gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev
check-latest: true

- name: Update VERSION
if: ${{ steps.release_please.outputs.release_created }}
id: update_version
shell: sh
run: cd internal/app && printf %s $(git tag | tail -1) > VERSION

- uses: goreleaser/goreleaser-action@v4
if: ${{ steps.release_please.outputs.release_created }}
name: Run Go Releaser
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ nfpms:
dst: /usr/share/doc/autocorrector/USAGE.md
- src: configs/corrections.toml
dst: /usr/share/autocorrector/corrections.toml
- src: assets/icon/autocorrector.png
- src: internal/app/assets/icon/autocorrector.png
dst: /usr/share/pixmaps/autocorrector.png
- src: assets/autocorrector.desktop
dst: /usr/share/applications/autocorrector.desktop
Expand Down

0 comments on commit 2071aae

Please sign in to comment.