Browse Source

Updated Github Workflow

master
Aigars Silkalns 3 days ago
parent
commit
6917074505
3 changed files with 77 additions and 61 deletions
  1. +27
    -22
      .github/workflows/merge.yml
  2. +49
    -39
      .github/workflows/release.yml
  3. +1
    -0
      src/assets/scripts/vectorMaps/jquery-jvectormap-world-mill.js

+ 27
- 22
.github/workflows/merge.yml View File

@ -1,6 +1,6 @@
name: Merge checks
on:
on:
pull_request:
branches:
- master
@ -11,25 +11,30 @@ jobs:
strategy:
matrix:
node-version: [20.x]
node-version: [22.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
- name: Get version
run: echo "::set-output name=version::v$(./ci/getVersion.sh)"
id: version
- name: Verify version
run: |
./ci/verifyVersion.sh ${{ steps.version.outputs.version }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Build
run: npm run build
- name: Get version
id: version
run: echo "version=v$(./ci/getVersion.sh)" >> $GITHUB_OUTPUT
- name: Verify version
run: ./ci/verifyVersion.sh ${{ steps.version.outputs.version }}

+ 49
- 39
.github/workflows/release.yml View File

@ -1,8 +1,9 @@
name: NodeJS with Webpack
name: Build and Release
on:
push:
branches: [ "master" ]
branches:
- master
jobs:
build:
@ -10,41 +11,50 @@ jobs:
strategy:
matrix:
node-version: [20.x]
node-version: [22.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 release:minified
zip -r -j static_minified.zip dist/*
npm run release:unminified
zip -r -j static_unminified.zip dist/*
- name: Get version
run: echo "::set-output name=version::v$(./ci/getVersion.sh)"
id: version
- name: Verify version
run: |
./ci/verifyVersion.sh ${{ steps.version.outputs.version }}
# Verify changelog has entry with new version
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.version.outputs.version }}
tag_name: ${{ steps.version.outputs.version }}
files: |
static_minified.zip
static_unminified.zip
fail_on_unmatched_files: true
prerelease: false
draft: false
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Build minified release
run: |
npm run release:minified
zip -r -j static_minified.zip dist/*
- name: Build unminified release
run: |
npm run release:unminified
zip -r -j static_unminified.zip dist/*
- name: Get version
id: version
run: echo "version=v$(./ci/getVersion.sh)" >> $GITHUB_OUTPUT
- name: Verify version
run: ./ci/verifyVersion.sh ${{ steps.version.outputs.version }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.version.outputs.version }}
tag_name: ${{ steps.version.outputs.version }}
files: |
static_minified.zip
static_unminified.zip
fail_on_unmatched_files: true
prerelease: false
draft: false
generate_release_notes: true

+ 1
- 0
src/assets/scripts/vectorMaps/jquery-jvectormap-world-mill.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save