Bump actions/checkout from 6 to 7 #90
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: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| jobs: | |
| test: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - id: swift | |
| name: swift version | |
| run: | | |
| version=$(cat .swift-version | tr '\n' ' ') | |
| echo $version | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - uses: swift-actions/setup-swift@v3 | |
| with: | |
| swift-version: '${{ steps.swift.outputs.version }}' | |
| - name: Run swiftlint | |
| run: | | |
| brew install swiftlint | |
| swiftlint | |
| - run: swift test -v | |
| build: | |
| runs-on: macos-14 | |
| needs: [test] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - id: swift | |
| name: swift version | |
| run: | | |
| version=$(cat .swift-version | tr '\n' ' ') | |
| echo $version | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - uses: swift-actions/setup-swift@v3 | |
| with: | |
| swift-version: '${{ steps.swift.outputs.version }}' | |
| - run: swift build -v -c release --arch arm64 --scratch-path .build-arm64 | |
| - run: swift build -v -c release --arch x86_64 --scratch-path .build-x86_64 | |
| - run: brew install go | |
| - uses: goreleaser/goreleaser-action@v7 | |
| with: | |
| version: latest | |
| install-only: true | |
| - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
| run: goreleaser release --clean --snapshot --verbose | |
| - if: startsWith(github.ref, 'refs/tags/v') | |
| run: goreleaser release --clean --verbose | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} |