Skip to content

Deps: Bump @babel/runtime from 7.22.5 to 7.22.6 #219

Deps: Bump @babel/runtime from 7.22.5 to 7.22.6

Deps: Bump @babel/runtime from 7.22.5 to 7.22.6 #219

Workflow file for this run

name: Release GSA with pontos
on:
pull_request:
types: [closed]
workflow_dispatch:
inputs:
release-type:
type: choice
description: What kind of release do you want to do (pontos --release-type argument)?
options:
- patch
- minor
- major
release-version:
type: string
description: Set an explicit version, that will overwrite release-type. Fails if version is not compliant.
jobs:
release:
name: Create a new release
# If the event is a workflow_dispatch or on of the labels 'pre release',
# 'patch release', 'minor release' or 'major release' is set and PR is
# closed because of a merge
# NOTE: priority of set labes will be alpha > release-candidate > patch > minor > major,
# so if 'major' and 'patch' labes are set, it will create a patch release.
if: |
( github.event_name == 'workflow_dispatch') || (
( contains(github.event.pull_request.labels.*.name, 'alpha release') ||
contains(github.event.pull_request.labels.*.name, 'rc release') ||
contains(github.event.pull_request.labels.*.name, 'patch release') ||
contains(github.event.pull_request.labels.*.name, 'minor release') ||
contains(github.event.pull_request.labels.*.name, 'major release')) &&
github.event.pull_request.merged == true )
runs-on: 'ubuntu-latest'
outputs:
git-release-tag: ${{ steps.release.outputs.git-release-tag }}
release-version: ${{ steps.release.outputs.release-version }}
steps:
- name: Selecting the Release type
id: release-type
uses: greenbone/actions/release-type@v3
with:
release-type-input: ${{ inputs.release-type }}
- name: Release with release action
id: release
uses: greenbone/actions/release@v3
with:
github-user: ${{ secrets.GREENBONE_BOT }}
github-user-mail: ${{ secrets.GREENBONE_BOT_MAIL }}
github-user-token: ${{ secrets.GREENBONE_BOT_TOKEN }}
release-type: ${{ steps.release-type.outputs.release-type }}
release-version: ${{ inputs.release-version }}
ref: ${{ steps.release-type.outputs.release-ref }}
versioning-scheme: "semver"
sign-release-files: "false"
build-dist:
name: Build JavaScript files
runs-on: "ubuntu-latest"
needs: release
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.release.outputs.git-release-tag }}
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: "14.x"
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Use Yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-14.x-${{ hashFiles('**/yarn.lock') }}
# `--prefer-offline` gives cache priority
- name: Install dependencies
run: yarn install --prefer-offline
- name: Build dist files
run: yarn build
- name: Create tarball
run: |
tar -C build -czvf gsa-dist-${{ needs.release.outputs.release-version }}.tar.gz .
- name: Upload dist file to release
run: |
gh release upload ${{ needs.release.outputs.git-release-tag }} gsa-dist-${{ needs.release.outputs.release-version }}.tar.gz
env:
GH_TOKEN: ${{ secrets.GREENBONE_BOT_TOKEN }}
sign:
runs-on: "ubuntu-latest"
needs: [release, build-dist]
steps:
- name: Sign release files
uses: greenbone/actions/sign-release-files@v3
with:
gpg-key: ${{ secrets.GPG_KEY }}
gpg-fingerprint: ${{ secrets.GPG_FINGERPRINT }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
release-version: ${{ needs.release.outputs.release-version }}
github-token: ${{ secrets.GREENBONE_BOT_TOKEN }}