Skip to content

Commit

Permalink
feat: support node20
Browse files Browse the repository at this point in the history
Adds support for node20 as node16 is being deprecated by github actions

Adds github/workflow for creating releases based on conventional commits
  • Loading branch information
Jmainguy committed May 9, 2024
1 parent fceea31 commit bf98b26
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 4 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: release-please

on:
push:
branches:
- main

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
- uses: actions/checkout@v4
- name: tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
name: A job to test action with prefix
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: JSON to variables
uses: antifree/json-to-variables@HEAD
with:
Expand All @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
name: A job to test action without prefix
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: JSON to variables
uses: antifree/json-to-variables@HEAD
with:
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.1.2"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The prefix (optional). Default value is empty string.
### YML example
```yml
- name: JSON to variables
uses: antifree/json-to-variables@v1.0.1
uses: antifree/json-to-variables@v1.0.1 # x-release-please-version
with:
filename: 'test.json'
prefix: 'test'
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ inputs:
required: false
default: ''
runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
11 changes: 11 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"packages": {
".": {
"release-type": "simple",
"extra-files": [
"README.md"
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

0 comments on commit bf98b26

Please sign in to comment.