-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chore): automatic npm releases, ci fix and add node 16
I would like to automate the npm publishing of new releases, so this PR adds another github workflow which publishes to npm ONLY when a new github release is published. I intentionally did not implement a version-adjustment inside package.json within the workflow script to avoid publishing wrong releases in case one of us does something wrong while adding tags . So unless we manually change the version number inside package json a possible npm publish will fail (because the old version already exists on npm) This PR also fixes the CI script, because the node version was always the latest LTS (16) because of a typo in the yml (you could check the CI logs to confirm. So at least this means FUI build well with node16/npm 8 :D (which i also tested manually) That said, i also increased the node version for the workflows to 14 (not 16, because that is active and could have impact by changes) as node 12 becomes unsupported in april this year
- Loading branch information
Showing
3 changed files
with
38 additions
and
8 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
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
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,30 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: [released] | ||
jobs: | ||
publish: | ||
name: Build new Release | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'fomantic/Fomantic-UI' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: pre-setup | ||
run: sh ./scripts/preinstall.sh | ||
- name: install dependencies | ||
run: npm install --ignore-scripts | ||
- name: fomantic install & build | ||
run: npx gulp install | ||
- name: publish to npm | ||
run: | | ||
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTOMATION}} | ||
CI: true |