update package categories #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
job1: | |
name: fetch tag and update Package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout files | |
uses: actions/checkout@v3 | |
- name: Get tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
with: | |
strip_v: true | |
- name: Update version in cargo.tooml | |
uses: colathro/toml-editor@1.1.1 | |
with: | |
file: Cargo.toml | |
key: package.version | |
value: ${{ steps.tag.outputs.tag }} | |
- name: Commit changes | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Update version | |
title: Update library to version | |
body: Update version to ${{ steps.tag.outputs.tag }} | |
branch: update-version-${{ steps.tag.outputs.tag }} | |
base: main | |
signoff: true | |
draft: false | |
outputs: | |
tag: ${{ steps.tag.outputs.tag }} | |
# Publish to the NPM registry | |
job2: | |
needs: job1 | |
name: Publishing packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout files and pulish to Crates.io | |
uses: actions/checkout@v3 | |
with: | |
ref: update-version-${{needs.job1.outputs.tag }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: katyo/publish-crates@v2 | |
with: | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |