Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#145] Add a workflow to draft a new release #241

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
- title: '⭐ Features'
label: 'type : feature'
- title: '🧹 Chores'
label: 'type : chore'
- title: '🐞 Bugs'
label: 'type : bug'
change-template: '- $TITLE'
template: |
$CHANGES
32 changes: 32 additions & 0 deletions .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Draft a new release

on:
push:
branches:
- main

env:
VERSION_FILE: ./package.json

jobs:
draft-new-release:
name: Draft a new release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get current version
id: current_version
run: |
currentVersion=$(node -p -e "require('${{ env.VERSION_FILE }}').version")
echo "version=$currentVersion" >> $GITHUB_OUTPUT

- name: Draft a new release
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ github.token }}
with:
version: ${{ steps.current_version.outputs.version }}