mirror of
https://github.com/l-lin/font-awesome-animation.git
synced 2024-12-26 05:21:31 +08:00
build: add release workflow
This commit is contained in:
parent
7f3a599f6a
commit
aa88c3e221
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -24,6 +24,6 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run a one-line script
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
|
||||
|
40
.github/workflows/publish.yml
vendored
Normal file
40
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: publish
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
|
||||
- name: Publish to NPM packages
|
||||
# includes a --ignore-scripts command argument to avoid executing npm life cycle scripts during this phase
|
||||
# for security concerns
|
||||
run: npm publish --ignore-scripts --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
# Setup .npmrc file to publish to GitHub Packages
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
|
||||
- name: Publish to Github packages
|
||||
run: npm publish --ignore-scripts --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ bin
|
||||
.zedstate
|
||||
tags
|
||||
dist
|
||||
build
|
||||
|
@ -28,6 +28,8 @@
|
||||
"generate:banner": "node scripts/generate_banner.js build/banner.css",
|
||||
"init:folders": "mkdir -p build && mkdir -p dist",
|
||||
"transform": "myth src/font-awesome-animation.css build/$npm_package_name.css --sourcemap",
|
||||
"transform:compress": "myth src/font-awesome-animation.css build/$npm_package_name.min.css --sourcemap --compress"
|
||||
"transform:compress": "myth src/font-awesome-animation.css build/$npm_package_name.min.css --sourcemap --compress",
|
||||
"version": "npm run build",
|
||||
"postversion": "git push && git push --tags"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user