CI update #185
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
name: main | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
config: | |
- node-version: '18.12.0' # LTS | |
CODE_TEST: 'test-legacy' | |
PKGSET: '' | |
PKG: '' | |
- node-version: '20.9.0' # LTS | |
CODE_TEST: 'test-legacy' | |
PKGSET: '' | |
PKG: '' | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
CODE_CHECK: 1 | |
PKGSET: '' | |
PKG: '' | |
- node-version: '21.7.3' # Latest | |
CODE_TEST: 'test' | |
PKGSET: '' | |
PKG: '' | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '7-windows' | |
PKG: | |
- shockwave-projector-director-7.0.0-win-win | |
- shockwave-projector-director-7.0.2-2-win-win | |
- shockwave-projector-director-7.0.2-trial-win-win | |
- shockwave-projector-director-7.0.2-win-win | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '8-windows' | |
PKG: | |
- shockwave-projector-director-8.0.0-trial-win-win | |
- shockwave-projector-director-8.0.0-win-win | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '8.5-windows' | |
PKG: | |
- shockwave-projector-director-8.5.0-win-win | |
- shockwave-projector-director-8.5.0-trial-win-win | |
- shockwave-projector-director-8.5.1-win-win | |
- shockwave-projector-director-8.5.1-trial-win-win | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '9-windows' | |
PKG: | |
- shockwave-projector-director-9.0.0-win-win | |
- shockwave-projector-director-9.0.0-trial-win-win | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '10-windows' | |
PKG: | |
- shockwave-projector-director-10.0.0-mac-win | |
- shockwave-projector-director-10.0.0-win-win | |
- shockwave-projector-director-10.1.0-mac-win | |
- shockwave-projector-director-10.1.0-win-win | |
- shockwave-projector-director-10.1.1-mac-win | |
- shockwave-projector-director-10.1.1-win-win | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '11-windows' | |
PKG: | |
- shockwave-projector-director-11.0.0-mac-win | |
- shockwave-projector-director-11.0.0-win-win | |
- shockwave-projector-director-11.0.0-hotfix-1-mac-win | |
- shockwave-projector-director-11.0.0-hotfix-3-mac-win | |
- shockwave-projector-director-11.0.0-hotfix-3-win-win | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '11.5-windows' | |
PKG: | |
- shockwave-projector-director-11.5.0-mac-win | |
- shockwave-projector-director-11.5.0-win-win | |
- shockwave-projector-director-11.5.8-mac-win | |
- shockwave-projector-director-11.5.8-win-win | |
- shockwave-projector-director-11.5.9-mac-win | |
- shockwave-projector-director-11.5.9-win-win | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '12-windows' | |
PKG: | |
- shockwave-projector-director-12.0.0-mac-win | |
- shockwave-projector-director-12.0.0-win-win | |
- shockwave-projector-director-12.0.2-mac-win | |
- shockwave-projector-director-12.0.2-win-win | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '11-mac' | |
PKG: | |
- shockwave-projector-director-11.0.0-mac-mac-zip | |
- shockwave-projector-director-11.0.0-win-mac-zip | |
- shockwave-projector-director-11.0.0-hotfix-1-mac-mac-zip | |
- shockwave-projector-director-11.0.0-hotfix-3-mac-mac-zip | |
- shockwave-projector-director-11.0.0-hotfix-3-win-mac-zip | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '11.5-mac' | |
PKG: | |
- shockwave-projector-director-11.5.0-mac-mac-zip | |
- shockwave-projector-director-11.5.0-win-mac-zip | |
- shockwave-projector-director-11.5.8-mac-mac-zip | |
- shockwave-projector-director-11.5.8-win-mac-zip | |
- shockwave-projector-director-11.5.9-mac-mac-zip | |
- shockwave-projector-director-11.5.9-win-mac-zip | |
- node-version: '20.12.2' # LTS (current) | |
CODE_TEST: 'test-legacy' | |
PKGSET: '12-mac' | |
PKG: | |
- shockwave-projector-director-12.0.0-mac-mac-zip | |
- shockwave-projector-director-12.0.0-win-mac-zip | |
- shockwave-projector-director-12.0.2-mac-mac-zip | |
- shockwave-projector-director-12.0.2-win-mac-zip | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.config.node-version }} | |
- name: Dependencies | |
run: npm ci | |
- name: shockpkg Cache | |
uses: actions/cache@v4 | |
if: matrix.config.PKGSET != '' | |
with: | |
key: shockpkg-${{ matrix.config.PKGSET }} | |
path: shockpkg | |
- name: shockpkg Update | |
run: npm run shockpkg -- update --summary | |
- name: shockpkg Install | |
run: npm run shockpkg -- install ${{ join(matrix.config.PKG, ' ') }} | |
if: matrix.config.PKG != '' | |
- name: Launchers | |
run: npm run launchers | |
- name: Build | |
run: npm run build | |
- name: Test ESM | |
run: npm run ${{ matrix.config.CODE_TEST }}:esm | |
- name: Test CJS | |
run: npm run ${{ matrix.config.CODE_TEST }}:cjs | |
- name: Lint | |
run: npm run lint | |
if: matrix.config.CODE_CHECK == 1 | |
- name: Formatted | |
run: npm run formatted | |
if: matrix.config.CODE_CHECK == 1 | |
publish: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.12.2' | |
registry-url: https://registry.npmjs.org/ | |
- name: Dependencies | |
run: npm ci | |
- name: Publish | |
run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |