update go workload #232
This file contains hidden or 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: Go | |
| on: [pull_request, push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: 1.24 | |
| - name: Remove old artifacts | |
| run: rm -rf artifacts/deploy | |
| - name: Build | |
| run: make all | |
| - name: Concat artifacts yaml | |
| if: ${{ github.event_name == 'push' }} | |
| run: | | |
| echo ${GITHUB_REF##*/} | |
| for i in artifacts/deploy/*; do cat $i >> artifacts/deploy/all.yaml; done; | |
| - id: git-branch | |
| if: ${{ github.event_name == 'push' }} | |
| run: | | |
| echo "::set-output name=git-branch::$(echo ${GITHUB_REF##*/} | tr '[A-Z]' '[a-z]')" | |
| - name: Publish to Dist Branch | |
| if: ${{ github.event_name == 'push' }} | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: dist | |
| folder: artifacts/deploy | |
| target-folder: ${{steps.git-branch.outputs.git-branch}} |