diff --git a/.github/workflows/auto_release.yml b/.github/workflows/auto_release.yml new file mode 100644 index 0000000..0ff5988 --- /dev/null +++ b/.github/workflows/auto_release.yml @@ -0,0 +1,31 @@ +name: AutoRelease + +on: + push: + tags: + - v* + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: "1.20" + + - run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o xlsxcfg_linux_amd64 ./bin/xlsxcfg/ + - run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o xlsxcfg_windows_amd64.exe ./bin/xlsxcfg/ + - run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o xlsxcfg_darwin_amd64 ./bin/xlsxcfg/ + - run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o xlsxcfg_darwin_arm64 ./bin/xlsxcfg/ + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + xlsxcfg_linux_amd64 + xlsxcfg_windows_amd64.exe + xlsxcfg_darwin_amd64 + xlsxcfg_darwin_arm64 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}