diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f42c73..7e44a6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,48 +1,22 @@ -name: Release - on: push: tags: - '*' jobs: - build-and-release: + release: + name: Release ${{ matrix.target }} runs-on: ubuntu-latest - + strategy: + fail-fast: false + matrix: + target: [x86_64-pc-windows-gnu, x86_64-unknown-linux-musl] steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Rust - uses: actions/setup-rust@v1 - - - name: Build for Linux - run: cargo build --release --target x86_64-unknown-linux-gnu - - - name: Build for Windows - run: cargo build --release --target x86_64-pc-windows-msvc - - - name: Create release - id: create_release - uses: actions/create-release@v1 + - uses: actions/checkout@v2 + - name: Compile and release + uses: rust-build/rust-build.action@v1.4.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: | - Changes in this release. - draft: false - prerelease: false - - - name: Upload Linux build - uses: actions/upload-artifact@v2 - with: - name: c3.x86.linux - path: target/x86_64-unknown-linux-gnu/release/c3 - - - name: Upload Windows build - uses: actions/upload-artifact@v2 - with: - name: c3.x86_64.windows.exe - path: target/x86_64-pc-windows-msvc/release/c3 + RUSTTARGET: ${{ matrix.target }} + EXTRA_FILES: "README.md LICENSE"