Skip to content

Merge pull request #1366 from enterprise-contract/dependabot/go_modul… #13

Merge pull request #1366 from enterprise-contract/dependabot/go_modul…

Merge pull request #1366 from enterprise-contract/dependabot/go_modul… #13

# Copyright The Enterprise Contract Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
---
name: Release Antora extensions
"on":
push:
branches:
- main
paths:
- 'reference-antora-extension/**'
- 'tekton-task-antora-extension/**'
- 'rego-antora-extension/**'
workflow_dispatch:
permissions:
contents: read
jobs:
release-antora-extension:
strategy:
matrix:
include:
- path: 'reference-antora-extension'
if: startsWith(github.event.head_commit.modified, "reference-antora-extension/**")
- path: 'tekton-task-antora-extension'
if: startsWith(github.event.head_commit.modified, "tekton-task-antora-extension/**")
- path: 'rego-antora-extension'
if: startsWith(github.event.head_commit.modified, "rego-antora-extension/**")
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
disable-telemetry: true
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# we don't want to restore 3+ GB of cache when we can fetch much less from npmjs.com
- name: Download NPM dependencies
run: npm ci
- name: Setup Node.js environment
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '${{ matrix.path }}/package.json'
- name: Release ${{ matrix.path }}
run: |
npm version prerelease --preid $(git rev-parse HEAD)
npm publish --access=public
working-directory: ${{ matrix.path }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}