Skip to content

Commit

Permalink
make publish a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisInSky committed Nov 6, 2024
1 parent d9768f9 commit 2294f5e
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/rs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,13 @@ jobs:
name: sails-assets
path: ./assets/

release:
name: Create Release
publish:
name: Publish Crates
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- prepare
#- ws_tests
#- cli_tests
- assets
defaults:
run:
shell: bash
Expand All @@ -142,16 +139,35 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ needs.prepare.outputs.rc_branch }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Crates onto Crates.io
- name: Publish Crates
run: |
VERSION=${{ needs.prepare.outputs.r_version }}
for SAILS_CRATE in $SAILS_CRATES; do
sed -i "/^\s*${SAILS_CRATE} = {.*}/ s/}/, version = \"=${VERSION}\" }/" Cargo.toml
done
cat Cargo.toml
cargo login
cargo login ${{ secrets.CRATES_IO_TOKEN }}
release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- prepare
- publish
- assets
defaults:
run:
shell: bash

steps:
- name: Checkout Code from Release Branch
uses: actions/checkout@v4
with:
ref: ${{ needs.prepare.outputs.rc_branch }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Download Assets
uses: actions/download-artifact@v4
Expand Down

0 comments on commit 2294f5e

Please sign in to comment.