Better verbose output in the CLI #16
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 Lametric CLI | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build | |
| run: swift build -c release --product lametric --arch x86_64 -Xswiftc -static-stdlib | |
| - name: Compress | |
| run: tar -czf lametric-${{ github.ref_name }}-linux-x86_64.tar.gz -C .build/x86_64-unknown-linux-gnu/release lametric | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lametric-linux | |
| path: lametric-${{ github.ref_name }}-linux-x86_64.tar.gz | |
| build-macos-arm64: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: "6.1.0" | |
| - name: Get swift version | |
| run: swift --version | |
| - uses: actions/checkout@v3 | |
| - name: Build | |
| run: swift build -c release --product lametric --arch arm64 | |
| - name: Compress | |
| run: tar -czf lametric-${{ github.ref_name }}-darwin-arm64.tar.gz -C .build/arm64-apple-macosx/release lametric | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lametric-macos-arm64 | |
| path: lametric-${{ github.ref_name }}-darwin-arm64.tar.gz | |
| build-macos-x86_64: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: "6.1.0" | |
| - name: Get swift version | |
| run: swift --version | |
| - uses: actions/checkout@v3 | |
| - name: Build | |
| run: swift build -c release --product lametric --arch x86_64 | |
| - name: Compress | |
| run: tar -czf lametric-${{ github.ref_name }}-darwin-x86_64.tar.gz -C .build/x86_64-apple-macosx/release lametric | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lametric-macos-x86_64 | |
| path: lametric-${{ github.ref_name }}-darwin-x86_64.tar.gz | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-macos-arm64, build-macos-x86_64] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Download Linux artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: lametric-linux | |
| - name: Download macOS ARM64 artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: lametric-macos-arm64 | |
| - name: Download macOS x86_64 artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: lametric-macos-x86_64 | |
| - name: Create Release | |
| run: | | |
| gh release create ${{ github.ref_name }} \ | |
| lametric-${{ github.ref_name }}-linux-x86_64.tar.gz \ | |
| lametric-${{ github.ref_name }}-darwin-arm64.tar.gz \ | |
| lametric-${{ github.ref_name }}-darwin-x86_64.tar.gz \ | |
| --title "Lametric CLI ${{ github.ref_name }}" \ | |
| --notes "Release ${{ github.ref_name }}" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |