From e8b1759d942211df9d3666958dc4c8aac4d67132 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 20 Sep 2023 13:27:23 +0100 Subject: [PATCH] MAINT - Updates to docs and workflows (#301) * :memo: Update docs * :construction_worker: Update workflow --- .github/workflows/release.yml | 37 ++++++++++---------------- README.md | 49 +++++++++++++++++++++++------------ 2 files changed, 46 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cbdb694a..6792cfee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,32 +1,25 @@ name: Release conda-store-ui on: - release: - types: [published] - workflow_dispatch: - + # 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 - build: + 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: "Setup node 🔧" - uses: actions/setup-node@v3 - with: - node-version: "16.x" - registry-url: "https://registry.npmjs.org" - - - name: "Get release tag 🏷" - run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: "Install dependencies 📦" run: yarn @@ -42,12 +35,10 @@ jobs: - name: "Generate package tarball 📦" run: yarn pack --filename conda-store-ui.tgz - - name: "Upload to npm 📤" - run: yarn publish --verbose --access public --tag ${{ env.RELEASE_TAG }} conda-store-ui.tgz - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: "Set latest tag 🏷" - run: yarn tag add @conda-store/conda-store-ui@${{ env.RELEASE_TAG }} latest + - name: "Publish to npm 📤" + run: | + echo "Publishing with tag ${{ env.GITHUB_REF }}" + yarn publish --verbose --access public --tag ${{ env.GITHUB_REF }}conda-store-ui.tgz + yarn tag add @conda-store/conda-store-ui@${{ env.GITHUB_REF }} latest env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 70f41e18..250f2650 100644 --- a/README.md +++ b/README.md @@ -6,31 +6,37 @@ --- -![GitHub Workflow Status - Build](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/build.yml?label=Build&logo=GitHub) -![GitHub Workflow Status (with event) - Release](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/release.yml?event=push&label=Release&logo=GitHub) -![GitHub Workflow Status - GitHub pages](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/pages.yml?label=Docs&logo=GitHub) -![GitHub release (the latest by date)](https://img.shields.io/github/v/release/conda-incubator/conda-store-ui?logo=Github) -![npm release version](https://img.shields.io/npm/v/@conda-store/conda-store-ui?label=release&logo=npm) +| Information | Links | +| :---------- | :-----| +| Project | [![License](https://img.shields.io/badge/License-BSD%203--Clause-gray.svg?&colorB=298642&style=flat.svg)](https://opensource.org/licenses/BSD-3-Clause) [![conda-store documentation](https://img.shields.io/badge/conda--store-documentation%20📖-gray.svg?&colorB=298642&style=flat.svg)][conda-store-docs] [![conda-store-ui documentation](https://img.shields.io/badge/conda--store--UI-documentation%20📖-gray.svg?&colorB=298642&style=flat.svg)][conda-store-ui-docs] | +| Wofklows | ![GitHub Workflow Status - Build](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/build.yml?label=Build&logo=GitHub) ![GitHub Workflow Status (with event) - Release](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/release.yml?event=push&label=Release&logo=GitHub) ![GitHub Workflow Status - GitHub pages](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/pages.yml?label=Docs&logo=GitHub) | +| Releases | ![GitHub release (the latest by date)](https://img.shields.io/github/v/release/conda-incubator/conda-store-ui?logo=Github) ![npm release version](https://img.shields.io/npm/v/@conda-store/conda-store-ui?label=release&logo=npm) | --- ## About -conda-store-ui is an add-on Graphical User Interface to [conda-store](https://github.com/conda-incubator/conda-store). -If you're looking for the JupyterLab Extension, you can find it at [jupyterlab-conda-store](https://github.com/conda-incubator/jupyterlab-conda-store). +conda-store-ui is an add-on Graphical User Interface to [conda-store][conda-store-repo]. +If you're looking for the JupyterLab Extension, you can find it at [jupyterlab-conda-store][jupyterlab-conda-store-repo] ## Get Started -To learn how to use conda-store-ui alongside conda-store, please visit [the conda-store-ui documentation](https://conda-incubator.github.io/conda-store-ui/). +To learn how to use conda-store-ui alongside conda-store, please visit [the conda-store-ui documentation][conda-store-ui-docs]. ## Development ### Setting up the development environment -We use [Docker Compose](https://docs.docker.com/compose/) to set up the infrastructure and conda as the package manager for node/yarn. Note -that you can use any method you wish to use yarn/nodejs. +We use [Docker Compose](https://docs.docker.com/compose/) to set up the infrastructure and recommend using `conda` as the package manager for NodeJS and yarn. -1. Clone this repo and from root, start Docker compose: +You will need to have the following installed: + +- [Docker compose](https://docs.docker.com/compose/install/) +- conda or mamba + +To get started: + +1. Clone this repo and from the root of the directory, start Docker compose: ```bash git clone https://github.com/conda-incubator/conda-store-ui.git @@ -38,7 +44,7 @@ that you can use any method you wish to use yarn/nodejs. docker-compose -f docker-compose-dev.yml up --build ``` -2. Install yarn and NodeJS. +2. Install yarn and NodeJS: > **Note** > Skip this if you are planning to use a local installation of yarn and NodeJS @@ -49,29 +55,31 @@ that you can use any method you wish to use yarn/nodejs. conda install -c conda-forge yarn nodejs==16.14.2 ``` -3. Finally, start the application +3. Finally, start the conda-store-ui application: ```bash + # install the dependencies yarn install + # build and start the application yarn run build yarn run start ``` -If you encounter issues, please take a look at Configuration (available in the documentation). +When compiling the application for development you will need to set a number of environment variables. Refer to the [Configuration documentation](https://conda-incubator.github.io/conda-store-ui/?path=/docs/docs-configuration--page) for more information. ### Making a release -In order to create a new version of this package, follow these steps: +To create a new version of this package, follow these steps: 1. Bump the version number in `package.json` (we use CalVer: `YYYY.MM.releaseNumber` starting with `releaseNumber=1`) 2. [Start a new GitHub release](https://github.com/conda-incubator/conda-store-ui/releases/new) - Call the release the current version, e.g. `2023.9.1` - In the **`Choose a Tag:`** dropdown, type in the release name (e.g., `2023.9.1`) and click "Create new tag" - - Add release notes in the field below[^github-activity] + - Add the release notes in the text field [^github-activity] 3. Confirm that the release completed successfully by checking the [GitHub Actions page](https://github.com/conda-incubator/conda-store-ui/actions). Once completed, a new release will be available at [npm - @conda-store/conda-store-ui](https://libraries.io/npm/@conda-store%2Fconda-store-ui) -[^github-activity]: If you wish, use [`github-activity` to generate a Changelog](https://github.com/choldgraf/github-activity), e.g. `github-activity conda-incubator/conda-store-ui --since 2023.9.1 --until 2023.10.1 --auth ` . +[^github-activity]: If you wish, use [`github-activity` to generate a Changelog](https://github.com/choldgraf/github-activity), e.g. `github-activity conda-incubator/conda-store-ui --since 2023.9.1 --until 2023.10.1 --auth ` ## Code of Conduct @@ -80,3 +88,10 @@ To guarantee a welcoming and friendly community, we require all community member ## License conda-store-ui is developed under the [BSD-3 LICENSE](./LICENSE). + + + +[conda-store-docs]: https://conda.store/en/latest/ +[conda-store-ui-docs]: https://conda-incubator.github.io/conda-store-ui/?path=/story/welcome--page +[conda-store-repo]: https://github.com/conda-incubator/conda-store +[jupyterlab-conda-store-repo]: https://github.com/conda-incubator/jupyterlab-conda-store \ No newline at end of file