forked from fomantic/Fomantic-UI
-
Notifications
You must be signed in to change notification settings - Fork 1
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
authored
Oct 18, 2019
1 parent
c629516
commit 8eb1705
Showing
6 changed files
with
61 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,28 @@ | ||
name: Nightly | ||
on: | ||
schedule: | ||
- cron: 0 22 * * * | ||
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: fomantic install & gulp build | ||
run: npx gulp install | ||
- name: update nightly version | ||
run: node ./scripts/nightly-version.js | ||
- name: publish to npm | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | ||
run: npm publish --tag nightly |
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.