Skip to content

Release

Release #24

Workflow file for this run

name: Release
on:
workflow_run:
workflows: [Test]
types: [completed]
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_branch }}
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: git config user.email "cerebraljs@gmail.com"
- run: git config user.name "Cerebral JS"
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
repository: cerebral/repo-cooker
- run: npm run release -- --print-release
if: github.event_name != 'pull_request'
env:
REPO_COOKER_GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
REPO_COOKER_NPM_OTP: ${{secrets.REPO_COOKER_NPM_OTP}}