Skip to content

Commit

Permalink
ci: fix rust toolchain already installed
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioArnt committed Jan 17, 2024
1 parent 0eceae9 commit 23b9374
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 29 deletions.
35 changes: 9 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,8 @@ on:
- main

jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update local toolchain
run: |
rustup update
rustup component add clippy
rustup component add rustfmt
- name: Toolchain info
run: |
cargo --version
rustc --version
cargo fmt --version
cargo clippy --version
- name: Lint
run: |
cd src
cargo fmt -- --check
cargo clippy -- -D warnings
- name: Test
run: |
cargo check
cargo test --all
need_publish:
runs-on: ubuntu-latest
needs: run_tests
outputs:
is_bumped: ${{ steps.npm_check.outputs.bump }}
npm_target_version: ${{ steps.npm_check.outputs.target_version }}
Expand Down Expand Up @@ -101,6 +75,15 @@ jobs:
toolchain: ${{ matrix.build.TOOLCHAIN }}
target: ${{ matrix.build.TARGET }}
override: true
- name: Lint
run: |
cd src
cargo fmt -- --check
cargo clippy -- -D warnings
- name: Test
run: |
cargo check
cargo test --all
- name: Build
uses: actions-rs/cargo@v1
with:
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ To publish a new version on NPM use the script to version and tag to trigger a G
export RELEASE_VERSION=1.0.12
sh ./version.sh ${RELEASE_VERSION}
git commit -am"chore: publish ${RELEASE_VERSION} :tada:"
git tag v${RELEASE_VERSION}
git push --tags
```

> This must be done on main branch, only maintainers are allowed to push tags on main
> When merged on main branch, the version will be published on NPM and git tag will be created

0 comments on commit 23b9374

Please sign in to comment.