Merge pull request #75 from spowelljr/buildServerImage #73
Workflow file for this run
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
name: Create Release | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@master | |
- name: Fetch Git Tags | |
run: | | |
git fetch --prune --unshallow --tags | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Test | |
run: | | |
export PATH=$PATH:$(go env GOPATH)/bin | |
make test | |
make clean | |
- name: Cross Platform Build | |
run: | | |
export PATH=$PATH:$(go env GOPATH)/bin | |
make cross | |
- name: Upload Linux amd64 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "gopogh-linux-amd64" | |
path: ./out/gopogh-linux-amd64 | |
- name: Upload Linux arm64 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "gopogh-linux-arm64" | |
path: ./out/gopogh-linux-arm64 | |
- name: Upload Linux arm | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "gopogh-linux-arm" | |
path: ./out/gopogh-linux-arm | |
- name: Upload Darwin | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "gopogh-darwin-amd64" | |
path: ./out/gopogh-darwin-amd64 | |
- name: Upload Darwin M1 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "gopogh-darwin-arm64" | |
path: ./out/gopogh-darwin-arm64 | |
- name: Upload windows | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "gopogh.exe" | |
path: ./out/gopogh.exe | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
body: | | |
${{ github.ref }} | |
mac os | |
curl -LO https://github.com/medyagh/gopogh/releases/download/${{ github.ref }}/gopogh-darwin-amd64 && sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh | |
files: ./out/* | |
- name: Publish to Docker Repository | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
name: medyagh/gopogh | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
tag_names: true | |