Build slack_cli #1
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: Build slack_cli | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "slack_cli-v[0-9]+.[0-9]+.[0-9]+" | |
| jobs: | |
| build_slack_cli: | |
| defaults: | |
| run: | |
| working-directory: slack_cli | |
| name: Build slack_cli | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest, macos-13] | |
| include: | |
| - binary-name: slack_cli_linux | |
| os: ubuntu-latest | |
| - binary-name: slack_cli.exe | |
| os: windows-latest | |
| - binary-name: slack_cli_macos | |
| os: macos-latest | |
| - binary-name: slack_cli_macos_x86 | |
| os: macos-13 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dart-lang/setup-dart@v1 | |
| - run: dart pub get | |
| - run: mkdir build | |
| - run: mkdir build/${{ matrix.os }} | |
| - run: dart compile exe bin/slack_cli.dart -o build/${{ matrix.os }}/${{ matrix.binary-name }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: bin-${{ matrix.os }} | |
| path: slack_cli/build/${{ matrix.os }}/${{ matrix.binary-name }} | |
| upload_artifacts: | |
| needs: build_slack_cli | |
| name: Upload Artifacts to GitHub Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: bin-ubuntu-latest | |
| path: bin-linux | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: bin-macos-latest | |
| path: bin-macos | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: bin-windows-latest | |
| path: bin-windows | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: bin-macos-13 | |
| path: bin-macos-x86 | |
| - name: Upload artifacts to existing release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: bin-*/* | |
| draft: false # Publish the release after artifacts are uploaded |