Skip to content

REL - 2024.6.1 (#405) #20

REL - 2024.6.1 (#405)

REL - 2024.6.1 (#405) #20

Workflow file for this run

name: Release conda-store-ui
on:
# we want to make a release whenever a new tag is created
push:
tags:
- "*"
jobs:
call-build:
uses: conda-incubator/conda-store-ui/.github/workflows/build.yml@main
make-release:
runs-on: ubuntu-latest
# ensure that the artifacts are available from the build job
needs: call-build
steps:
- name: "Checkout repository 🛎"
uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- name: "Set up Node.js 🧶"
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: "@conda-store-ui"
- name: "Install dependencies 📦"
run: yarn
- name: "Lint code 🔎"
run: yarn eslint:check
- name: "Download webpack bundle 📦"
uses: actions/download-artifact@v3
with:
name: webpack-bundle
path: dist/
- name: "Generate package tarball 📦"
run: yarn pack --filename conda-store-ui.tgz
- name: "Set NPM scope" #(setup-node workaround https://github.com/actions/setup-node/issues/763)
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm config delete @conda-store-ui:registry --location project
npm config set @conda-store-ui:registry 'https://registry.npmjs.org' --location project
npm config set //registry.npmjs.org/:_authToken '${NPM_AUTH_TOKEN}' --location project
- name: "Publish to npm 📤"
run: |
echo "Publishing with tag ${{ env.GITHUB_REF_NAME }}"
npm publish --verbose --access public conda-store-ui.tgz
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}