Skip to content

Commit

Permalink
chore: release-please draft integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Jun 22, 2023
1 parent 29a6498 commit 8155b11
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Release PR

on:
push:
branches: [ main ]

permissions:
contents: write
pull-requests: write

env:
node-version: 18.x

jobs:
release-pr:
name: Release Please
runs-on: ubuntu-latest

steps:
- uses: google-github-actions/release-please-action@v3
id: ReleasePR
with:
default-branch: main
package-name: '@exadel/esl'
versioning-strategy: default
release-type: node
command: release-pr
changelog-types: '[
{"type":"feat","section":"Features","hidden":false},
{"type":"fix", "section":"Bug Fixes","hidden":false},
{"type":"refactor", "section":"Refactoring","hidden":false},
]'
pull-request-title-pattern: 'chore${scope}: release ${component} ${version}'
labels: 'release: counted'
release-labels: 'released'

# The logic below handles the npm publication:
- if: ${{ steps.ReleasePR.outputs.release_created }}
uses: actions/checkout@v3
with:
persist-credentials: false

- if: ${{ steps.ReleasePR.outputs.release_created }}
name: Use Node v${{ env.node-version }}
uses: actions/setup-node@v3
with:
cache: 'npm'
node-version: ${{ env.node-version }}

- if: ${{ steps.ReleasePR.outputs.release_created }}
name: Install NPM Dependencies
run: npm ci

# - if: ${{ steps.ReleasePR.outputs.release_created }}
# run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# - if: ${{ steps.ReleasePR.outputs.release_created }}
# name: Upload Release Artifact
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run:
# gh release upload ${{ steps.release.outputs.tag_name }} ./artifact/some-build-artifact.zip

0 comments on commit 8155b11

Please sign in to comment.