|
|
|
@ -0,0 +1,54 @@ |
|
|
|
name: NodeJS with Webpack |
|
|
|
|
|
|
|
jobs: |
|
|
|
build: |
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
node-version: [16.x] |
|
|
|
|
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v3 |
|
|
|
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }} |
|
|
|
uses: actions/setup-node@v3 |
|
|
|
with: |
|
|
|
node-version: ${{ matrix.node-version }} |
|
|
|
|
|
|
|
- name: Build |
|
|
|
run: | |
|
|
|
npm install |
|
|
|
npm run build |
|
|
|
zip -r -j static.zip dist/* |
|
|
|
|
|
|
|
- name: Get version |
|
|
|
run: echo "::set-output name=version::$(./ci/getVersion.sh)" |
|
|
|
id: version |
|
|
|
|
|
|
|
# - name: Verify version |
|
|
|
# run: | |
|
|
|
# ./ci/verifyVersion.sh |
|
|
|
|
|
|
|
# Verify changelog has entry with new version |
|
|
|
|
|
|
|
- name: Create release |
|
|
|
uses: actions/create-release@v1 |
|
|
|
id: create_release |
|
|
|
with: |
|
|
|
draft: false |
|
|
|
prerelease: false |
|
|
|
release_name: ${{ steps.version.outputs.version }} |
|
|
|
tag_name: ${{ github.ref }} |
|
|
|
env: |
|
|
|
GITHUB_TOKEN: ${{ github.token }} |
|
|
|
|
|
|
|
- name: Upload artifacts |
|
|
|
uses: actions/upload-release-asset@v1 |
|
|
|
env: |
|
|
|
GITHUB_TOKEN: ${{ github.token }} |
|
|
|
with: |
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }} |
|
|
|
asset_path: static.zip |
|
|
|
asset_name: static.zip |
|
|
|
asset_content_type: application/gzip |