fix publish issue due to missing arg #6
Workflow file for this run
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: publish | |
permissions: | |
contents: write | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
install: | |
name: Installs and configures nix | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkouts code | |
uses: actions/checkout@v2 | |
- name: Sets up Node for registry only | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.12' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Caches Nix store | |
uses: actions/cache@v3 | |
id: nix-cache | |
with: | |
path: /tmp/nix-cache | |
key: nix-${{ hashFiles('**/flake.*') }} | |
- name: Caches Node modules | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Installs Nix | |
uses: cachix/install-nix-action@v22 | |
with: | |
nix_path: nixpkgs=channel:nixos-23.05 | |
extra_nix_config: | | |
experimental-features = nix-command flakes | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: Imports Nix store cache | |
if: ${{ steps.nix-cache.outputs.cache-hit == 'true' }} | |
run: nix-store --import < /tmp/nix-cache | |
- name: Installs deps | |
run: nix develop -c yarn install --frozen-lockfile --immutable | |
- name: Exports Nix store cache | |
if: ${{ steps.nix-cache.outputs.cache-hit != 'true' }} | |
run: nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nix-cache | |
- name: Builds lib | |
working-directory: lib | |
run: nix develop -c yarn build | |
- name: Copies README to the lib folder | |
run: cp README.md LICENSE lib/ | |
- name: Publishes the lib | |
working-directory: lib | |
run: nix develop -i -k NODE_AUTH_TOKEN -c yarn publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Builds the demo | |
working-directory: demo | |
run: nix develop -c yarn build | |
env: | |
PUBLIC_URL: /react-pin-field | |
- name: Deploys the demo | |
uses: jamesives/[email protected] | |
with: | |
branch: gh-pages | |
folder: demo/build |