Skip to content

Commit

Permalink
docs(examples/github-actions.yml): add github actions example
Browse files Browse the repository at this point in the history
  • Loading branch information
FerencoVonMatterhorn authored and fwiedmann committed Aug 20, 2021
1 parent 9e40e81 commit ec8dc17
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Go
on: [ push, pull_request ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Init go-semantic-release
run: |
wget https://github.com/Nightapes/go-semantic-release/releases/download/v2.0.1/go-semantic-release.linux_x86_64.zip
unzip go-semantic-release.linux_x86_64.zip
chmod +x go-semantic-release.linux_x86_64
- name: Build binary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o <your-build-name>.linux_x86_64
GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -o <your-build-name>.windows_i386.exe
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o <your-build-name>.windows_x86_64.exe
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o <your-build-name>.darwin_x86_64
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./go-semantic-release.linux_x86_64 release --loglevel trace

0 comments on commit ec8dc17

Please sign in to comment.