Skip to content

Create Release

Create Release #28

Workflow file for this run

name: Create Release
on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:
env:
NODE_VERSION: 20
FORCE_COLOR: 1
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.yarn
key: test-${{ runner.os }}-node${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }}
- name: Enable corepack for Yarn
run: corepack enable
- name: install
run: yarn install
- name: lint
run: yarn run lint
- name: test
run: yarn run test
- name: test
run: yarn run build
- name: Release
id: release
env:
GIT_AUTHOR_NAME: holomekc
GIT_AUTHOR_EMAIL: 30546982+holomekc@users.noreply.github.com
GIT_COMMITTER_NAME: holomekc
GIT_COMMITTER_EMAIL: 30546982+holomekc@users.noreply.github.com
GH_TOKEN: ${{ github.token }}
run: |
yarn run release
- name: Create Release Notes
id: create-release-notes
shell: bash
if: steps.release.outputs.version != ''
env:
GH_TOKEN: ${{ github.token }}
run: |
#!/bin/bash
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/releases \
-f tag_name='${{ steps.release.outputs.version }}' \
-f target_commitish='${{ github.sha }}' \
-f name='${{ steps.release.outputs.version }}' \
-F draft=false \
-F prerelease=false \
-F generate_release_notes=true