-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(actions): add nightly build action
Add an action to run a nightly build at 22:00 UTC everyday and publish it to npm with the nightly tag. This will allow users to use `npm install fomantic-ui@nightly` to use the latest features early.
- Loading branch information
Sean
committed
Oct 21, 2019
1 parent
4b5cd6b
commit e14db9d
Showing
6 changed files
with
64 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Nightly | ||
on: | ||
schedule: | ||
- cron: 00 23 * * * | ||
jobs: | ||
build: | ||
name: Build nightly distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
ref: develop | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: pre-setup | ||
run: sh ./scripts/preinstall.sh | ||
- name: install dependencies | ||
run: npm install --ignore-scripts | ||
- name: update nightly version | ||
run: node ./scripts/nightly-version.js | ||
- 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 --tag nightly | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | ||
CI: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,27 @@ | ||
// node | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
// npm | ||
const fetch = require('node-fetch') | ||
|
||
// pkg | ||
const pkg = require('../package.json') | ||
|
||
const ghBase = 'https://api.github.com' | ||
const repoUrlPath = 'fomantic/Fomantic-UI' | ||
|
||
const run = async function () { | ||
return fetch(`${ghBase}/repos/${repoUrlPath}/milestones`) | ||
.then(r => r.json()) | ||
.then(milestones => milestones.filter(m => m.title.indexOf('x') === -1)[0].title) | ||
} | ||
|
||
run() | ||
.then(nextVersion => { | ||
pkg.version = nextVersion | ||
}) | ||
.then(() => { | ||
fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2)) | ||
}) | ||
.then(() => console.log('Done')) |
File renamed without changes.