-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from snhane/master
feat: provide pre-built binaries for Linux distributions, including Debian-based systems.
- Loading branch information
Showing
4 changed files
with
54 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,26 +5,39 @@ name: Go | |
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
types: | ||
- opened | ||
- edited | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
dump_tag: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_id: ${{ steps.create_release.outputs.id }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: go mod tidy | ||
- run: go build | ||
- run: go test -v ./... | ||
continue-on-error: true | ||
# temporarily continue even if unit tests fail | ||
|
||
create_tag: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: github.ref == 'refs/heads/master' | ||
# outputs: | ||
# release_id: ${{ steps.create_release.outputs.id }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Bump release version and push tag | ||
id: release | ||
uses: anothrNick/[email protected] # Don't use @master or @v1 unless you're happy to test the latest version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token | ||
WITH_V: false | ||
WITH_V: true | ||
PRERELEASE: false | ||
|
||
- name: get the latest tag | ||
|
@@ -43,50 +56,25 @@ jobs: | |
draft: false | ||
prerelease: false | ||
|
||
unix: | ||
goreleaser: | ||
needs: create_tag | ||
runs-on: ubuntu-latest | ||
needs: dump_tag | ||
if: github.ref == 'refs/heads/master' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
- name: Checkout | ||
uses: actions/checkout@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 | ||
|
||
fetch-depth: 0 | ||
- 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 }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
release_id: ${{ needs.dump_tag.outputs.release_id }} | ||
asset_path: samora.exe | ||
asset_name: samora-lang-win.exe | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.idea/* | ||
*.iml | ||
*.ipr | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
project_name: samora-lang | ||
builds: | ||
- env: [CGO_ENABLED=0] | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
nfpms: | ||
- maintainer: Ismael GraHms <[email protected]> | ||
description: Samora Lang - A Simple Interpreted Programing Language just for Educational Purposes | ||
homepage: https://github.com/GraHms/Samora-Lang | ||
license: MIT | ||
formats: | ||
- deb | ||
- rpm | ||
- apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters