Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed CI not working with deprecated package #3

Merged
merged 7 commits into from
May 24, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
name: NPM Release
name: Cargo Release

on:
release:
types:
- released

env:
CI: true

permissions:
id-token: write
pull_request:

jobs:
publish:
Expand All @@ -19,19 +14,26 @@ jobs:
- name: Clean variable
id: version
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
TAG="v3.2.1"
VERSION="${TAG#v}"
echo "${TAG#v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Edit Toml
uses: ciiiii/[email protected]
- name: Set up Python
uses: actions/setup-python@v2
with:
file: "Cargo.toml"
key: "version"
value: "${{ steps.version.outputs.VERSION }}"
python-version: 3.8
- run: pip install toml-cli
- name: Edit Toml version
run: toml set --toml-path Cargo.toml package.version $VERSION
env:
VERSION: ${{ steps.version.outputs.VERSION }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: cat Cargo.toml
- uses: katyo/publish-crates@v2
if: github.event_name == 'push'
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Loading