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
| # SPDX-FileCopyrightText: 2023 Stefan Hackenberg <mail@stefan-hackenberg.de> | |
| # | |
| # SPDX-License-Identifier: MIT | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| release: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Format | |
| run: cargo fmt --check | |
| - name: Clippy | |
| run: cargo clippy -- --deny warnings | |
| - name: Build | |
| run: cargo build --release | |
| - name: Package artifact | |
| shell: bash | |
| run: | | |
| target=$(rustc -vV | sed -n 's|host: ||p') | |
| if [[ "${{ matrix.os }}" == "windows-latest" ]]; then | |
| cp target/release/rainbow-rs.exe . | |
| 7z a rainbow-rs-${target}.zip rainbow-rs.exe | |
| else | |
| cp target/release/rainbow-rs . | |
| tar -czf rainbow-rs-${target}.tar.gz rainbow-rs | |
| fi | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| LICENSES/MIT.txt | |
| *.tar.gz | |
| *.zip |