Skip to content

publish

publish #62

Workflow file for this run

name: publish
on:
release:
types: [published, released]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build && ls -lah dist/
- name: Publish
id: publish
if: github.repository == 'wayjam/picgo-plugin-s3'
uses: JS-DevTools/npm-publish@v3
with:
registry: 'https://registry.npmjs.org'
token: ${{ secrets.NPM_TOKEN }}
- name: Output
if: steps.publish.outputs.type != 'none'
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"