diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3fb2760 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,48 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version: '1.26' + + - name: Build + run: make build + + - name: Upload Binary + uses: actions/upload-artifact@v7 + with: + name: compatdata-humanizer + path: compatdata-humanizer + archive: false + + release: + needs: build + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download Artifact + uses: actions/download-artifact@v8 + with: + name: compatdata-humanizer + path: dist/ + + - name: Create GitHub Release + uses: softprops/action-gh-release@v3 + with: + files: dist/**