Skip to content

Commit

Permalink
wip: add goreleaser in the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
snhane committed Oct 26, 2023
1 parent 5e476b9 commit cbcd5e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 54 deletions.
58 changes: 5 additions & 53 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,76 +40,28 @@ jobs:
- name: create release
id: create_release
uses: ncipollo/release-action@v1
if: success() && !startsWith(github.ref, 'refs/tags/v')
with:
token: "${{ secrets.GITHUB_TOKEN }}"
tag: ${{ steps.tag.outputs.tag_name }}
name: ${{ steps.tag.outputs.tag_name }}
draft: false
prerelease: false

unix:
runs-on: ubuntu-latest
needs: dump_tag
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: Build samora
run: go build -o "samora" ./main.go

- name: Upload the sml unix asset
id: unix-release-asset
uses: basefas/upload-release-asset-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.dump_tag.outputs.release_id }}
asset_path: samora
asset_name: samora-lang

win:
runs-on: windows-latest
needs: dump_tag
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: Build samora.exe
run: go build -o "samora.exe" ./main.go

- name: Upload samora.exe asset
id: windows-release-asset
uses: basefas/upload-release-asset-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.dump_tag.outputs.release_id }}
asset_path: samora.exe
asset_name: samora-lang-win.exe
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
-
name: Run GoReleaser
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
if: success() && startsWith(github.ref, 'refs/tags/v')
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ builds:
- arm64
nfpms:
- maintainer: Ismael GraHms <grahms@outlook.com>
description: Provides support for editing samora scripts with full support for font-locking, but no special keybindings, or indentation handling
description: Samora Lang - A Simple Interpreted Programing Language just for Educational Purposes
homepage: https://github.com/GraHms/Samora-Lang
license: MIT
formats:
Expand Down

0 comments on commit cbcd5e4

Please sign in to comment.