Skip to content

Commit

Permalink
Add github actions workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Yoriyasu Yano <[email protected]>
  • Loading branch information
yorinasub17 committed Oct 18, 2023
1 parent b5b66c2 commit 6254eb1
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Logs**
Any error logs indicating the bug. Please share debug logs as well.

**Minimal reproducible example**
Example code snippets and tests that will demonstrate the issue.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
84 changes: 84 additions & 0 deletions .github/workflows/lint-test-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: lint-test-release

on:
push:
branches:
- main
pull_request:

permissions:
checks: write
contents: read

jobs:
# Run linter and tests against JS, TS, and YAML files
linttest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: "lts/*"

- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598
name: Install pnpm
with:
version: 8
run_install: false

- name: install dependencies
run: pnpm install --frozen-lockfile

- name: lint
run: pnpm lint

- name: test
run: pnpm test

- name: report
uses: mikepenz/action-junit-report@75b84e78b3f0aaea7ed7cf8d1d100d7f97f963ec # v4.0.0
if: always()
with:
report_paths: "junit.xml"
check_name: "test report"

# Cut a release tag based on conventional-commits and semantic-release, and publish it.
release:
runs-on: ubuntu-latest
needs: linttest
if: github.ref == 'refs/heads/main'
steps:
- name: Auth as CI/CD bot
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.FENSAK_CICD_BOT_APP_ID }}
private_key: ${{ secrets.FENSAK_CICD_BOT_PRIVATE_KEY }}

- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: "lts/*"

- uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598
name: Install pnpm
with:
version: 8
run_install: false

- name: install dependencies
run: pnpm install --frozen-lockfile

- name: build
run: pnpm build

- name: release
run: pnpm release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 comments on commit 6254eb1

Please sign in to comment.