Skip to content

Merge pull request #71 from photostructure/update-exiftool-13.52 #86

Merge pull request #71 from photostructure/update-exiftool-13.52

Merge pull request #71 from photostructure/update-exiftool-13.52 #86

Workflow file for this run

name: Build & Release
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
version:
description: Version bump (choose "patch" to bump a `-pre` prerelease into stable)
required: true
type: choice
default: "patch"
options:
- patch
- minor
- major
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos and linux are tested with exiftool-vendored.pl:
os: [windows-latest]
# See https://github.com/nodejs/release#release-schedule
node-version: [20, 22, 24, 25]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
release:
runs-on: ubuntu-latest # git-ssh-signing-action doesn't currently support windows
needs: [build]
if: ${{ github.event_name == 'workflow_dispatch' }}
permissions:
id-token: write # Required for OIDC
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Need full history for release-it
- name: Configure git line endings
run: |
git config core.autocrlf false
git config core.eol lf
# setup-node with registry-url is required for OIDC trusted publishing
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Set up SSH signing
uses: photostructure/git-ssh-signing-action@fdd4b062a9ba41473f013258cc9c7eea1640f826 # v1.2.0
with:
ssh-signing-key: ${{ secrets.SSH_SIGNING_KEY }}
git-user-name: ${{ secrets.GIT_USER_NAME }}
git-user-email: ${{ secrets.GIT_USER_EMAIL }}
- name: Update npm to latest
run: |
echo "Current npm version:"
npm --version
echo "Updating npm to latest..."
npm install -g npm@latest
echo "New npm version:"
npm --version
- name: Install dependencies
run: npm ci --force # --force ignores the os limitation in package.json
- name: Release
run: npm run release -- --ci ${{ github.event.inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}