Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@ jobs:
- name: "Upload artifacts 📤"
uses: actions/upload-artifact@v4
with:
name: webpack-bundle
path: dist/
path: |
dist/
lib/

- name: "Run pack dry-run 📦"
run: yarn pack --filename conda-store-ui.tgz --dry-run
24 changes: 13 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ on:
push:
tags:
- "*"
pull_request:
paths:
- ".github/workflows/release.yml"

jobs:
call-build:
uses: conda-incubator/conda-store-ui/.github/workflows/build.yml@main
name: "Call Build Job 🏗️"
# uses: conda-incubator/conda-store-ui/.github/workflows/build.yml@main
# using local to debug
uses: ./.github/workflows/build.yml

make-release:
name: "Make conda-store-ui Release 🚀"
runs-on: ubuntu-latest
# ensure that the artifacts are available from the build job
needs: call-build
Expand All @@ -27,30 +34,25 @@ jobs:
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 📦"
- name: "Download build artefacts 📦"
uses: actions/download-artifact@v4
with:
name: webpack-bundle
path: dist/

- run: ls -lR

- 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 }}
if: github.repository_owner == 'conda-incubator' && github.event.push.tags == true
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 📤"
if: github.repository_owner == 'conda-incubator' && github.event.push.tags == true
run: |
echo "Publishing with tag ${{ env.GITHUB_REF_NAME }}"
npm publish --verbose --access public conda-store-ui.tgz
Expand Down
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
1. Build the package locally:

```bash
# clean build artefacts to avoid issues
yarn run clean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, the clean command doesn't currently clear the dist/ directory, and may be missing other directories that it should clear

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the yarn run webpack:prod or whatever that is cleans dist.
We can do a clean:slate instead if one wants to be safe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I don't understand why someone would need to run this command if they run already ran git clean -fxdq on line 5 above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because people not always follow steps in a linear way and mess up when running through things 🤷🏽‍♀️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. But I would hope that someone would be a bit more careful when doing a release.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove that if it is too much cruft, as long as it makes sense to people it is fine.
And I also hope people are careful, including me, but mistakes can happen, it's just the way it is.

yarn install

# build the package
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@
"node": ">=18.0.0"
},
"packageManager": "[email protected]"
}
}