Skip to content

refactor: dump

refactor: dump #61

Workflow file for this run

name: Tests
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write # https://github.com/semantic-release/semantic-release/issues/2469#issuecomment-1158013884
pages: write
id-token: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # provided automatically by github itself https://docs.github.com/en/actions/security-guides/automatic-token-authentication
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # search in keepassx
jobs:
test:
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images#available-images
strategy:
fail-fast: false
matrix:
version: [14, 16, 18] # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
- name: Set Up Environment
run: |
if [ "${{ matrix.version }}" = "18" ]; then
export SPECIAL_STEP=true
export MYMATRIX="${{ matrix.version }}"
fi
- name: Clean before artifact
#if: env.SPECIAL_STEP == 'true'
run: |
printenv
/bin/bash .github/clean_before_github_pages.sh
- name: Upload artifact
if: env.SPECIAL_STEP == 'true'
uses: actions/upload-pages-artifact@v1
with:
path: .
# Deployment job
github-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
needs: test
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
npm:
needs: test # https://docs.github.com/en/actions/using-jobs/using-jobs-in-a-workflow#defining-prerequisite-jobs
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-22.04 # https://github.com/actions/runner-images#available-images
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install semantic-release
run: /bin/bash bash/swap-files-v2.sh package.json package.dev.json -- yarn add semantic-release conventional-changelog-conventionalcommits
# it has to be done here beacause otherwise it will crash for node@15 with error>>> error semantic-release@19.0.5: The engine "node" is incompatible with this module. Expected version ">=16 || ^14.17". Got "15.14.0"
- name: npm pack
run: npm pack
# https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md
- name: Release
run: node node_modules/.bin/semantic-release --debug