Debugging #14
Workflow file for this run
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: Release | |
on: [push] | |
env: | |
OLD_VERSION: 1.0.4 | |
NEW_VERSION: 1.0.5 | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.package-version.outputs.current-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get current version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@master | |
with: | |
path: 'packages/svelte-reveal' | |
- name: Get latest version | |
id: latest-version | |
uses: 'WyriHaximus/github-action-get-previous-tag@v1' | |
- name: Compare versions | |
uses: madhead/semver-utils@latest | |
id: version | |
with: | |
version: ${{ env.NEW_VERSION }} | |
compare-to: ${{ env.OLD_VERSION }} | |
- run: | | |
echo "${{ steps.version.outputs.comparison-result }}" | |
- name: Check for new version | |
if: ${{ steps.version.outputs.comparison-result != '>' }} | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('The last version (${{ env.OLD_VERSION }}) and the current version (${{ env.NEW_VERSION }}) are the same') | |
release: | |
runs-on: ubuntu-latest | |
needs: check-version | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build package | |
run: npm run build -- --filter=svelte-reveal |