diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1ed4ca..5c9d766 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: prerelease-branches: "^(rc|beta|alpha)$" build: needs: get-version - if: ${{ needs.get-version.outputs.will-release }} + if: ${{ needs.get-version.outputs.will-release == 'true' }} runs-on: ${{ matrix.runner }} timeout-minutes: 20 env: @@ -100,7 +100,7 @@ jobs: release: needs: [ get-version, build ] - if: ${{ needs.get-version.outputs.will-release }} + if: ${{ needs.get-version.outputs.will-release == 'true' }} uses: shiipou/github-actions/.github/workflows/release.yml@main with: version: ${{ needs.get-version.outputs.version }} @@ -108,3 +108,40 @@ jobs: is-prerelease: ${{ needs.get-version.outputs.is-prerelease == 'true' }} download-artifacts: true assets: artifacts/**/* + + publish: + needs: [ get-version, build ] + if: ${{ needs.get-version.outputs.will-release == 'true' }} + runs-on: ubuntu-latest + env: + VERSION: ${{ needs.get-version.outputs.version }} + jobs: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + target: ${{ matrix.target }} + + - name: Install cargo-edit + uses: actions-rs/cargo@v1 + with: + command: install + args: cargo-edit + + - name: Set version + uses: actions-rs/cargo@v1 + with: + command: set-version + args: ${{ env.VERSION }} + + - name: Build target + uses: actions-rs/cargo@v1 + with: + command: publish + args: -p clone-project-manager --allow-dirty --token "${{ secrets.CARGO_TOKEN }}" +