diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e9713427..8b4ebc40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Build conda-store-ui on: pull_request: branches: @@ -14,26 +14,28 @@ jobs: name: "Build Package" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: "Checkout repository ๐Ÿ›Ž" + uses: actions/checkout@v4 - - name: Use Node.js + - name: "Set up Node.js ๐Ÿงถ" uses: actions/setup-node@v3 with: node-version: '16.x' - - name: Install dependencies + - name: "Install dependencies ๐Ÿ“ฆ" run: yarn - - name: Lint code + - name: "Lint code ๐Ÿ”" run: yarn eslint:check - - name: Build application + - name: "Build application ๐Ÿ—" run: yarn run build - - name: Build application artifacts + - name: "Build application artifacts ๐Ÿ—" run: yarn run webpack bundle - - uses: actions/upload-artifact@v3 + - name: "Upload artifacts ๐Ÿ“ค" + uses: actions/upload-artifact@v3 with: name: webpack-bundle path: dist/ diff --git a/.github/workflows/deploy.yml b/.github/workflows/release.yml similarity index 58% rename from .github/workflows/deploy.yml rename to .github/workflows/release.yml index 91d6b35d..c4cf66c2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/release.yml @@ -1,45 +1,43 @@ -name: Deploy +name: Release conda-store-ui + on: + release: + types: [published] workflow_dispatch: - push: - tags: - - 'v*' - + jobs: call-build: uses: conda-incubator/conda-store-ui/.github/workflows/build.yml@main - deploy-build: + make-release: runs-on: ubuntu-latest + # ensure that the artifacts are available from the build job needs: call-build steps: - - name: Checkout - uses: actions/Checkout@v3 + - name: "Checkout repository ๐Ÿ›Ž" + uses: actions/checkout@v4 - - name: Set release tag + - name: "Get release tag ๐Ÿท" run: echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Get dependencies for tsc + - name: "Install dependencies ๐Ÿ“ฆ" run: yarn - - name: Lint code + - name: "Lint code ๐Ÿ”Ž" run: yarn eslint:check - - name: Download generated dist + - name: "Download webpack bundle ๐Ÿ“ฆ" uses: actions/download-artifact@v3 with: name: webpack-bundle path: dist/ - # - name: Set package new-version - # run: yarn version --new-version ${{ env.RELEASE_TAG }} - - - name: Generate package tarball + - name: "Generate package tarball ๐Ÿ“ฆ" run: yarn pack --filename conda-store-ui.tgz - - name: Upload to npm + - 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 }} diff --git a/Dockerfile b/Dockerfile index 09731f46..e2787a6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.16-alpine3.15 +FROM node:16.16-alpine3.18 WORKDIR /usr/src/app diff --git a/README.md b/README.md index 042f3d5b..5137722a 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,77 @@ # conda-store-ui -Graphical User Interface for [conda-store](https://github.com/conda-incubator/conda-store) -![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/build.yml?label=Build&logo=GitHub) -![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/deploy.yml?event=push&label=Deploy&logo=GitHub) -![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/pages.yml?label=Docs&logo=GitHub) +
+ conda-store logo +
-![GitHub release (latest by date)](https://img.shields.io/github/v/release/conda-incubator/conda-store-ui?logo=Github) -![npm (scoped)](https://img.shields.io/npm/v/@conda-store/conda-store-ui?label=release&logo=npm) -------------------- +--- -## Get Started +![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) + +--- -To learn how to use conda-store-ui alongisde conda-store, please visit our [documentation](https://conda-incubator.github.io/conda-store-ui/). +## About -## Related Work +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). + +## Get Started -conda-store-ui is an addon 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). +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/). -## Developing +## Development -We use Docker Compose to set up the infrastructure and conda as the package manager for node/yarn. Note +### 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. -1) Clone this repo and from root, start docker compose: +1. Clone this repo and from root, start Docker compose: -```bash -git clone https://github.com/conda-incubator/conda-store-ui.git -cd conda-store-ui -docker-compose -f docker-compose-dev.yml up --build -``` + ```bash + git clone https://github.com/conda-incubator/conda-store-ui.git + cd conda-store-ui + docker-compose -f docker-compose-dev.yml up --build + ``` -2) Then, install yarn/node.js. +2. Install yarn and NodeJS. -**Note** Skip this if you are planning to use a local install of yarn/nodejs + > **Note** + > Skip this if you are planning to use a local installation of yarn and NodeJS -```bash -conda create --name conda-store-ui -conda activate conda-store-ui -conda install -c conda-forge yarn nodejs==16.14.2 -``` + ```bash + conda create --name conda-store-ui + conda activate conda-store-ui + conda install -c conda-forge yarn nodejs==16.14.2 + ``` -3) Finally, start the application +3. Finally, start the application -```bash -yarn install -yarn run build -yarn run start -``` + ```bash + yarn install + yarn run build + yarn run start + ``` If you encounter issues, please take a look at Configuration (available in the documentation). -## Releasing +### Making a release In order to create a new version of this package, follow these steps: -* Bump the version number in `package.json` - -* Go to the releases tab, and create a new release. Note that the release version tag _must_ match the new version from package.json - -* Wait for actions to execute and the new package will be uploaded to `npm` + +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] +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) -Latest Release: 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), eg `github-activity conda-incubator/conda-store-ui --since 2023.9.1 --until 2023.10.1 --auth ` . ## Code of Conduct diff --git a/RELEASE.md b/RELEASE.md index e1da770f..69d84eeb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,19 +1,22 @@ -# manual release +# Manual release process -1. increment version in package.json -2. run - ```bash - # do a dry run first to check - npm publish --access public --dry-run +1. Increment version in `package.json` +2. Perform a local dry run build: + + ```bash + # dry run build + npm publish --access public --dry-run + + # the real publish-to-npmjs command + npm publish --access public + ``` + +3. Ensure that whatever code you published is checked into git, then tag and push the commit and tag - # the real publish-to-npmjs command - npm publish --access public - ``` -3. ensure that whatever code you just publish is checked into git, then tag and push the commit and tag ```bash - # use the same version here as in package.json, but with a leading `v` - git tag -a vx.y.z + # use the same version here as in package.json, but without a leading `v` + git tag -a YYYY.M.ReleaseNumber - # push both any unpushed commits and the new tag + # push to upstream git push && git push --tags ``` diff --git a/package.json b/package.json index cfaaf61c..c2c91c53 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,10 @@ "name": "@conda-store/conda-store-ui", "version": "0.1.5", "description": "UI elements for building a frontend for conda-store", + "homepage": "https://github.com/conda-incubator/conda-store-ui", + "bugs": { + "url": "https://github.com/conda-incubator/conda-store-ui/issues" + }, "scripts": { "build": "tsc --build", "build:watch": "tsc --build --watch", @@ -27,6 +31,10 @@ "conda-store" ], "license": "BSD-3-Clause", + "repository": { + "type": "git", + "url": "https://github.com/conda-incubator/conda-store-ui" + }, "files": [ "dist/**/*", "lib/**/*", @@ -125,4 +133,4 @@ "webpack-dev-server": "^4.8.1", "whatwg-fetch": "^3.6.2" } -} +} \ No newline at end of file