mirror of
https://github.com/LukeHagar/stats-action.git
synced 2025-12-06 04:21:26 +00:00
Refactor GitHub Stats Action to use Bun, update dependencies, and enhance README with detailed usage instructions. Bump version to 0.0.6.
This commit is contained in:
45
.github/workflows/release.yaml
vendored
45
.github/workflows/release.yaml
vendored
@@ -7,32 +7,36 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push the
|
||||
# added or changed files to the repository.
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Run tests
|
||||
run: bun test
|
||||
|
||||
- name: Type check
|
||||
run: bun run typecheck
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
concurrency:
|
||||
group: release-action
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Run install
|
||||
uses: borales/actions-yarn@v5
|
||||
with:
|
||||
cmd: install
|
||||
|
||||
- name: Run build
|
||||
uses: borales/actions-yarn@v5
|
||||
with:
|
||||
cmd: build
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get package info
|
||||
id: package-info
|
||||
@@ -40,15 +44,10 @@ jobs:
|
||||
with:
|
||||
path: .
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "chore(release): ${{ steps.package-info.outputs.version }}"
|
||||
branch: main
|
||||
|
||||
- name: Publish Draft Release if doesn't exist
|
||||
run: |
|
||||
if ! gh release view ${{ steps.package-info.outputs.version }} >/dev/null 2>&1; then
|
||||
gh release create --draft ${{ steps.package-info.outputs.version }} --title "${{ steps.package-info.outputs.version }}" --generate-notes
|
||||
gh release create --draft ${{ steps.package-info.outputs.version }} --title "${{ steps.package-info.outputs.version }}" --generate-notes
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user