Initial commit: mp3rgain v0.1.0 - Lossless MP3 volume adjustment #1
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: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build for ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-action@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mp3rgain-${{ matrix.target }} | |
| path: target/${{ matrix.target }}/release/mp3rgain | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create universal macOS binary | |
| run: | | |
| mkdir -p dist | |
| lipo -create \ | |
| artifacts/mp3rgain-x86_64-apple-darwin/mp3rgain \ | |
| artifacts/mp3rgain-aarch64-apple-darwin/mp3rgain \ | |
| -output dist/mp3rgain | |
| chmod +x dist/mp3rgain | |
| - name: Create macOS tarball | |
| run: | | |
| cd dist | |
| tar -czvf mp3rgain-${{ github.ref_name }}-macos-universal.tar.gz mp3rgain | |
| shasum -a 256 mp3rgain-${{ github.ref_name }}-macos-universal.tar.gz > mp3rgain-${{ github.ref_name }}-macos-universal.tar.gz.sha256 | |
| - name: Create Linux tarball | |
| run: | | |
| cd artifacts/mp3rgain-x86_64-unknown-linux-gnu | |
| chmod +x mp3rgain | |
| tar -czvf ../../dist/mp3rgain-${{ github.ref_name }}-linux-x86_64.tar.gz mp3rgain | |
| cd ../../dist | |
| shasum -a 256 mp3rgain-${{ github.ref_name }}-linux-x86_64.tar.gz > mp3rgain-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| dist/mp3rgain-${{ github.ref_name }}-macos-universal.tar.gz | |
| dist/mp3rgain-${{ github.ref_name }}-macos-universal.tar.gz.sha256 | |
| dist/mp3rgain-${{ github.ref_name }}-linux-x86_64.tar.gz | |
| dist/mp3rgain-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256 | |
| generate_release_notes: true |