aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-09-12 21:45:30 +0700
committerFactiven <[email protected]>2023-09-12 21:45:30 +0700
commit701798acaeb28f657bd1420d06253d350eb41b96 (patch)
tree6df53eb6c7ae07c5af21bcd6d3a0078b1d196d13 /.github
parentCreate build-test.yml (diff)
downloadmoopa-701798acaeb28f657bd1420d06253d350eb41b96.tar.xz
moopa-701798acaeb28f657bd1420d06253d350eb41b96.zip
initial v4 commit
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md2
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md2
-rw-r--r--.github/workflows/main.yml43
3 files changed, 27 insertions, 20 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index e1e9dcb..a9f67d9 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
-title: "[Bug] Your Title Here"
+title: "[BUG]"
labels: "\U0001F41B bug"
assignees: ''
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 17ce160..d669e68 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -1,7 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
-title: "[Enhancements] Your Title Here"
+title: "[Enhancements]"
labels: enhancement
assignees: ''
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6a82241..73c0433 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,31 +1,38 @@
-name: Create Release on Version Update
+name: Build and Release
on:
push:
branches:
- main
-permissions:
- contents: write
+
jobs:
- create_release:
+ build-and-release:
runs-on: ubuntu-latest
steps:
- - name: Check commit message and version
- id: check_version
- run: |
- commit_message=$(git log -1 --pretty=format:%s)
- version=$(echo $commit_message | grep -o -E "v[0-9]+\.[0-9]+\.[0-9]+" || true)
- echo "Version found in commit message: $version"
- echo "::set-output name=version::$version"
- shell: bash
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: 18
+
+ - name: Get version from package.json
+ id: app-version
+ uses: martinbeentjes/[email protected]
+
+ - name: Create Changelog
+ id: changelog
+ run: echo "CHANGELOG=$(git log --format='- %s' ${{ github.event.before }}..${{ github.sha }})" >> $GITHUB_ENV
+
- name: Create Release
- id: create_release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ id: create-release
+ uses: softprops/action-gh-release@v1
with:
- tag_name: ${{ steps.check_version.outputs.version }}
- release_name: Release ${{ steps.check_version.outputs.version }}
+ token: ${{ secrets.GITHUB_TOKEN }}
+ body: ${{ steps.changelog.outputs.changelog }}
+ tag_name: v${{ steps.app-version.outputs.current-version}}
+ name: Release v${{ steps.app-version.outputs.current-version}}
draft: false
prerelease: false