Skip to content

Commit

Permalink
ci: fix the release (#896)
Browse files Browse the repository at this point in the history
- Publish the homebrew formula in a different dedicated step
- Use a dedicated access token for updating the homebrew formula
- Fix the name of Docker publish job
- Fix the access to the PHAR within the Docker publish job
  • Loading branch information
theofidry authored Mar 2, 2023
1 parent 84d2e7c commit 2e6585b
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,35 @@ jobs:
name: box-phar
path: .

- name: Upload box.phar
- name: Upload PHAR to the release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
box.phar
box.phar.asc
publish-homebrew-tap:
runs-on: ubuntu-latest
name: Publish Homebrew tap
needs:
- publish-phar
if: github.event_name == 'release'
steps:
- name: Update Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.BOX_HOMEBREW_TAP_TOKEN }}
tap: box-project/homebrew-box
formula: humbug/box
tag: ${{ github.event.release.tag_name }}
revision: ${{ github.event.release.target_commitish }}


publish-docker-image:
runs-on: ubuntu-latest
name: Publish PHAR
name: Publish the Docker image
needs:
- build-phar
if: github.event_name == 'release'
Expand All @@ -113,10 +124,10 @@ jobs:
# See https://github.com/actions/download-artifact#limitations
# the permissions are not guaranteed to be preserved
- name: Ensure PHAR is executable
run: chmod 755 bin/box.phar
run: chmod 755 box.phar

- name: Check that the PHAR works
run: bin/box.phar --ansi --version
run: box.phar --ansi --version

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down

0 comments on commit 2e6585b

Please sign in to comment.