Open BowTiedDevOps opened 3 months ago
fyi i've added the npm auth token to this repo
@hugocaillard @MarvinJanssen After talking to Jesse, we've come to a solution regarding the access option - we will keep it public (if anyone wants to publish a private package, this ain't the place) and I'll change to an action that makes parsing the args to npm publish
easier. I do have 1 question regarding the solo npm ci
step though (silly me thought it comes from Continuous Integration) - it's useless rn, I can either remove it or do a npm ci && npm test
command which will look like this:
- name: Test Package
id: test_package
run: |
cd ${{ needs.check_version_change.outputs.PACKAGE_PATH }}
npm ci
npm test
Question is - do we want to test before publish or not?
Yes npm ci
is a bit badly named i think
Yes I think it's better to run the tests before publishing 👍
Run with npm test
and publish after latest commit: https://github.com/BowTiedDevOps/stacks-test-tools/actions/runs/8570853362/job/23489745755
Description
As per https://github.com/stacks-network/stacks-test-tools/issues/6, a workflow that automatically pushes packages to npm when it detects a version changed is a good addition, because some developers that update these packages might not have the permissions to publish themselves, and it makes their jobs easier by not having to worry about uploading the package once it's updated - that is now automated.
Closes #6
Notes:
NODE_AUTH_TOKEN
must be added, and it should contain the npm auth token of thestacks
organisation (Automation
type, so it can bypass2FA
).--access=public
option fornpm publish
command because I couldn't test it with private packages. This will need a discussion with Jesse so I can properly update the command.Workflow runs:
@stacks/clarunit
): https://github.com/BowTiedDevOps/stacks-test-tools/actions/runs/8554791139commitbranch of this PR (added job names so it shows them instead of the ids): https://github.com/BowTiedDevOps/stacks-test-tools/actions/runs/8555076098NPM Profile (Published Packages): https://www.npmjs.com/~bowtieddevops
Tag @wileyj and @hugocaillard because I can't add reviewers on this repo.