Merge pull request #25 from link89/fix-name-pattern #115
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
name: Build and Upload scow-slurm-adapter Binary | |
on: | |
pull_request: | |
branches: [master] | |
push: | |
tags: | |
- v** | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- uses: bufbuild/buf-setup-action@v1.18.0 | |
with: | |
github_token: ${{ github.token }} | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: PB Codegen | |
run: make protos | |
- name: Test | |
# When unit test is ready, change this to true | |
if: false | |
run: make test | |
- name: Build binaries | |
run: | | |
make ARCH=amd64 build | |
make ARCH=arm64 build | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: scow-slurm-adapter | |
path: | | |
./scow-slurm-adapter-amd64 | |
./scow-slurm-adapter-arm64 | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
if: github.ref_type == 'tag' | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download scow-slurm-adapter | |
uses: actions/download-artifact@v3 | |
with: | |
name: scow-slurm-adapter | |
path: release | |
- name: Display structure of downloaded files | |
run: ls -R | |
working-directory: release | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
generate_release_notes: true | |
files: | | |
release/scow-slurm-adapter-amd64 | |
release/scow-slurm-adapter-arm64 |