Skip to content

build(deps): bump the npm-production group with 2 updates (#119) #147

build(deps): bump the npm-production group with 2 updates (#119)

build(deps): bump the npm-production group with 2 updates (#119) #147

Workflow file for this run

name: Release Action
on:
workflow_dispatch:
inputs: {}
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-pr:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
config-file: .github/release/config.json
manifest-file: .github/release/manifest.json
release:
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, 'release expense-action')}}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
config-file: .github/release/config.json
manifest-file: .github/release/manifest.json
skip-github-pull-request: true
- uses: actions/checkout@v4
with:
fetch-depth: 0
if: ${{ steps.release.outputs.release_created }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
if: ${{ steps.release.outputs.release_created }}
- name: Install Dependencies
run: npm ci
if: ${{ steps.release.outputs.release_created }}
- name: Build
run: npm run package
if: ${{ steps.release.outputs.release_created }}
- name: Publish to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
major_version: ${{ steps.release.outputs.major }}
full_version:
${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
tag_name: ${{ steps.release.outputs.tag_name }}
run: |
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit --allow-empty --message "Release v${full_version} at ${GITHUB_SHA}"
git tag -d v$major_version || true
git tag -d v$full_version || true
git tag -a v$major_version -m "Release v$full_version"
git tag -a v$full_version -m "Release v$full_version"
git push origin main
git push origin v$major_version --force
git push origin v$full_version
git tag -a $tag_name $GITHUB_SHA -m "Release v$full_version"
git push origin $tag_name
if: ${{ steps.release.outputs.release_created }}