From 2f85486a9e0964f324beaa6a381edc0f0ba5b2b0 Mon Sep 17 00:00:00 2001 From: Thomas Rasch Date: Tue, 6 Aug 2024 20:42:28 +0200 Subject: [PATCH] Homebrew release gh action --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..59efdf0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + workflow_dispatch: + inputs: + tag-name: + description: 'The git tag name to bump the formula to' + required: true + +jobs: + homebrew: + name: Bump Homebrew formula + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Build executable for release + run: swift build -c release --arch arm64 --arch x86_64 --product mvt + - name: Compress archive + run: tar -czf ${{ github.ref_name }}.tar.gz -C .build/apple/Products/Release mvt + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ${{ github.ref_name }}.tar.gz + token: ${{ secrets.GITHUB_TOKEN }} + - uses: mislav/bump-homebrew-formula-action@v3 + with: + formula-name: mvt-tools + homebrew-tap: Outdooractive/homebrew-tap + base-branch: main + download-url: https://github.com/Outdooractive/mvt-tools/releases/download/${{ github.ref_name }}/${{ github.ref_name }}.tar.gz + env: + COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}