Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ on:
push:
branches:
- main
# Publish an existing release tag to npm, e.g. when the publish step failed after
# release-please had already cut the release (a re-run then skips publishing).
workflow_dispatch:
inputs:
tag:
description: 'Release tag to publish, e.g. defender-v0.9.6'
required: true

name: release-please

Expand All @@ -18,7 +11,6 @@ permissions:

jobs:
release-please:
if: github.event_name == 'push'
runs-on: ubuntu-latest
outputs:
released: ${{ steps.release.outputs.paths_released != '[]' }}
Expand Down Expand Up @@ -70,39 +62,3 @@ jobs:
version: ${{ needs.release-please.outputs.version }}
secrets:
REPO_GH_PAT: ${{ secrets.REPO_GH_PAT }}

publish-tag:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
env:
TAG: ${{ inputs.tag }}
steps:
- name: Check tag
run: |
[[ "$TAG" =~ ^defender-v[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Not a release tag: $TAG"; exit 1; }
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: refs/tags/${{ inputs.tag }}
lfs: true
- name: Check version matches tag
run: |
version=$(node -p "require('./package.json').version")
[[ "defender-v$version" == "$TAG" ]] || { echo "package.json is $version, tag is $TAG"; exit 1; }
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- name: Setup Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '22.23.5'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Build
run: |
pnpm install --frozen-lockfile
pnpm build
- name: Publish
run: |
pnpm publish-release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading