Merge pull request #2 from I-Want-ToBelieve/release/0.1.1 #2
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: | |
- main | |
jobs: | |
version: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v23 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
- name: Verify Nix Installation | |
run: nix shell nixpkgs#nix-info -c nix-info -m | |
- name: Install Direnv With Nix | |
uses: aldoborrero/direnv-nix-action@v2 | |
with: | |
use_nix_profile: true | |
nix_channel: nixpkgs | |
- name: Load PATH Changes | |
run: direnv exec . sh -c 'echo $PATH' > "$GITHUB_PATH" | |
- name: Load other environment changes | |
run: direnv export gha >> "$GITHUB_ENV" | |
- name: Setup | |
run: pnpm run setup | |
- name: Setup Git User | |
run: git-user:setup | |
- name: Create Release Pull Request Or Publish To NPM | |
# https://github.com/changesets/action | |
uses: changesets/action@v1 | |
with: | |
version: pnpm run version | |
commit: 'chore: update versions' | |
title: 'chore: update versions' | |
# this expects you to have a script called release which does a build for your packages and calls changeset publish | |
publish: pnpm run release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |