chore: minor fixes #50
This file contains 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: release | |
on: | |
push: | |
branches: [master] | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
steps: | |
- uses: google-github-actions/release-please-action@v4 | |
id: release | |
with: | |
release-type: node | |
package-name: tree-sitter-beancount | |
bump-minor-pre-major: true | |
bump-patch-for-minor-pre-major: true | |
extra-files: | | |
Cargo.toml | |
publish_cargo: | |
name: Publish Crate | |
runs-on: ubuntu-latest | |
needs: [release-please] | |
if: needs.release-please.outputs.release_created | |
steps: | |
- name: Installing Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Checking out sources | |
uses: actions/checkout@v4 | |
- name: Cache Cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-publish-${{ hashFiles('**/Cargo.lock') }} | |
- name: Installing dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y -qq pkg-config libssl-dev | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --token ${{ secrets.CARGO_API_KEY }} --allow-dirty | |
publish_npm: | |
name: Publish npm | |
runs-on: ubuntu-latest | |
needs: [release-please] | |
if: needs.release-please.outputs.release_created | |
steps: | |
- name: Checking out sources | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/[email protected] | |
with: | |
node-version: '16' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Publish to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |