mirror of
https://github.com/ForkAwesome/Fork-Awesome
synced 2024-06-19 22:15:16 +02:00
Create npm-publish-github-packages.yml
Create CI/CD workflow with GitHub Actions
This commit is contained in:
parent
16f9cddaea
commit
e08ea6dd8d
47
.github/workflows/npm-publish-github-packages.yml
vendored
Normal file
47
.github/workflows/npm-publish-github-packages.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
||||||
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
||||||
|
|
||||||
|
name: Node.js Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
# - name: Set up Ruby 2.6
|
||||||
|
# uses: actions/setup-ruby@v1
|
||||||
|
# with:
|
||||||
|
# ruby-version: 2.6.x
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 17
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y && sudo apt-get install -y --no-install-recommends \
|
||||||
|
fontforge \
|
||||||
|
woff-tools \
|
||||||
|
woff2
|
||||||
|
sudo gem install bundler:1.17.3
|
||||||
|
sudo bundle install
|
||||||
|
- name: Build fonts and CSS
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
make -C src/icons
|
||||||
|
npm run build
|
||||||
|
- name: prepare for publish
|
||||||
|
run: |
|
||||||
|
mkdir fork-awesome
|
||||||
|
cp -r css less fonts scss fork-awesome/
|
||||||
|
tar zcvf fork-awesome.tgz fork-awesome/
|
||||||
|
- name: Upload a Build Artifact
|
||||||
|
uses: actions/upload-artifact@v2.3.1
|
||||||
|
with:
|
||||||
|
path: fork-awesome.tgz
|
Loading…
Reference in a new issue