-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 📦 ci(.github): refactored release-please workflow and readded the npm-publish workflow (not tested) * 🧪 test(index.njk): readded the generated home content to the home page also refactored markup to loop back a more sensible layout * 📦 ci(.github): fixed npm publish and release please actions to release when PR is merged * 📦 ci(.github): fixed errors in indentation and syntax in workflows for releasing package * 📦 ci(release-please.yml): fixed syntax and indentation
- Loading branch information
Showing
4 changed files
with
80 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
name: NPM package | ||
|
||
on : | ||
release: | ||
types: | ||
- "created" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm i && npm run code:publish | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: | | ||
npm i | ||
npm test | ||
env: | ||
NPM_TOKEN: ${{secrets.NPM_PUBLISH}} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
name: release-please | ||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
release-type: node | ||
package-name: release-please-action | ||
# The logic below handles the npm publication: | ||
- uses: actions/checkout@v4 | ||
# these if statements ensure that a publication only occurs when | ||
# a new release is created: | ||
if: ${{ steps.release.outputs.release_created }} | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
if: ${{ steps.release.outputs.release_created }} | ||
- run: npm i | ||
if: ${{ steps.release.outputs.release_created }} | ||
- run: | | ||
cat << EOF > "$HOME/.npmrc" //registry.npmjs.org/:_authToken=$NPM_PUBLISH EOF | ||
env: | ||
NPM_TOKEN:${{secrets.NPM_PUBLISH}} | ||
if: ${{ steps.release.outputs.release_created }} | ||
- name: Build package | ||
run: cd huetiful | ||
if: ${{ steps.release.outputs.release_created }} | ||
- name: Run NPM publish | ||
run: | | ||
npm run code:publish | ||
npm run publish | ||
env: | ||
NPM_TOKEN:${{secrets.NPM_PUBLISH}} | ||
if: ${{ steps.release.outputs.release_created }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters