This commit is contained in:
@@ -2,8 +2,8 @@ name: Build ESLint Config on Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -24,14 +24,22 @@ jobs:
|
||||
- name: Build
|
||||
run: bun run build
|
||||
|
||||
- name: Verify dist
|
||||
- name: Get version from package.json
|
||||
id: pkg
|
||||
run: |
|
||||
if [ ! -d "dist" ]; then
|
||||
echo "Build failed: dist/ directory not found"
|
||||
exit 1
|
||||
fi
|
||||
version=$(bun run -c 'console.log(require("./package.json").version)')
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create release
|
||||
- name: Create git tag
|
||||
run: |
|
||||
git config user.name "gitea-actions[bot]"
|
||||
git config user.email "gitea-actions[bot]@users.noreply.gitea.com"
|
||||
git tag ${{ steps.pkg.outputs.version }}
|
||||
git push origin ${{ steps.pkg.outputs.version }}
|
||||
|
||||
- name: Create GitHub release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/index.js
|
||||
tag_name: ${{ steps.pkg.outputs.version }}
|
||||
files: |
|
||||
dist/index.js
|
||||
|
||||
Reference in New Issue
Block a user