diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 158f826..1b88227 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,13 @@ jobs: - uses: actions/checkout@v2 - run: git fetch --all --tags + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + - name: Check Release Version uses: thebongy/version-check@v1 with: @@ -51,11 +58,25 @@ jobs: tagFormat: v${version} id: version_check - - name: Publish Release + - name: Publish Release (crates.io) uses: actions-rs/cargo@v1 with: command: publish args: --token ${{ secrets.CRATES_IO_TOKEN }} + + - name: Cargo Package + uses: actions-rs/cargo@v1 + with: + command: package + args: --allow-dirty + + - name: Publish Release (Github Release) + uses: softprops/action-gh-release@v1 + with: + files: target/package/juno-${{steps.version_check.outputs.rawVersion}}.crate + tag_name: ${{steps.version_check.outputs.releaseVersion}} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release-staging: if: github.ref == 'refs/heads/staging' @@ -65,6 +86,14 @@ jobs: - uses: actions/checkout@v2 - run: git fetch --all --tags + + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + - name: Check Release Version uses: thebongy/version-check@v1 with: @@ -75,9 +104,24 @@ jobs: - name: Find and Replace run: sed -i -e 's/version = "${{ steps.version_check.outputs.rawVersion }}"/version = "${{ steps.version_check.outputs.rawVersion }}-beta"/g' Cargo.toml - - name: Publish Release + - name: Publish Release (crates.io) uses: actions-rs/cargo@v1 with: command: publish args: --token ${{ secrets.CRATES_IO_TOKEN }} --allow-dirty + + - name: Cargo Package + uses: actions-rs/cargo@v1 + with: + command: package + args: --allow-dirty + + - name: Publish Release (Github Release) + uses: softprops/action-gh-release@v1 + with: + files: target/package/juno-${{steps.version_check.outputs.rawVersion}}.crate + tag_name: ${{steps.version_check.outputs.releaseVersion}} + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}