Merge pull request #11 from Mr-Zombii/main #41
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go: [1.25] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Test | |
| run: go test ./... | |
| - name: Build (All) | |
| run: bash scripts/build.sh | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flint-binaries | |
| path: dist/ | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: false # github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: flint-binaries | |
| path: dist/ | |
| - name: Read FULL_VERSION | |
| id: version | |
| run: echo "FULL_VERSION=$(cat dist/FULL_VERSION.txt)" >> "$GITHUB_ENV" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: "${{ env.FULL_VERSION }}" | |
| name: "${{ env.FULL_VERSION }}" | |
| files: | | |
| dist/flint-linux-amd64 | |
| dist/flint-linux-arm | |
| dist/flint-linux-arm64 | |
| dist/flint-darwin-amd64 | |
| dist/flint-darwin-arm64 | |
| dist/flint-windows-amd64.exe | |
| dist/flint-windows-arm64.exe | |
| dist/flint-*-checksum.sha256 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |