Add events now, --config, --hide (#16)
#15
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| actions: write | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: macos-15 | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Select Xcode | |
| run: sudo xcode-select -s /Applications/Xcode_16.2.app | |
| - name: Build universal binary | |
| run: swift build -c release --arch arm64 --arch x86_64 | |
| - name: Package binary | |
| run: | | |
| BINARY_PATH=$(swift build -c release --arch arm64 --arch x86_64 --show-bin-path)/ical-guy | |
| ARCHIVE_NAME="ical-guy-${TAG_NAME}-macos-universal.tar.gz" | |
| STAGING=$(mktemp -d) | |
| cp "$BINARY_PATH" "$STAGING/" | |
| cp -R man "$STAGING/" | |
| tar -czf "$ARCHIVE_NAME" -C "$STAGING" . | |
| echo "ARCHIVE_NAME=$ARCHIVE_NAME" >> "$GITHUB_ENV" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ env.ARCHIVE_NAME }} | |
| generate_release_notes: true | |
| - name: Update homebrew tap | |
| run: | | |
| gh workflow run bump-formula.yml \ | |
| -f formula=ical-guy \ | |
| -f "version=${GITHUB_REF##refs/tags/}" \ | |
| -R itspriddle/homebrew-brews | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} |