Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT - Pre-release maintenance #294

Merged
merged 4 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build conda-store-ui
on:
pull_request:
branches:
Expand All @@ -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/
32 changes: 15 additions & 17 deletions .github/workflows/deploy.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.16-alpine3.15
FROM node:16.16-alpine3.18

WORKDIR /usr/src/app

Expand Down
89 changes: 50 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
<div align="center">
<img src="https://raw.githubusercontent.com/conda-incubator/conda-store/main/docs/_static/images/conda-store-logo-vertical-lockup.svg" alt="conda-store logo" width="30%">
</div>

![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`
<!-- TODO: need to link to CalVer/release docs -->
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 <GH personal access token>` .

## Code of Conduct

Expand Down
29 changes: 16 additions & 13 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -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
```
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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/**/*",
Expand Down Expand Up @@ -125,4 +133,4 @@
"webpack-dev-server": "^4.8.1",
"whatwg-fetch": "^3.6.2"
}
}
}