Skip to content

Commit 1182a9b

Browse files
Lint workflow
1 parent 2cf4fb5 commit 1182a9b

2 files changed

Lines changed: 87 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- develop
9+
pull_request:
10+
branches:
11+
- main
12+
- master
13+
- develop
14+
15+
jobs:
16+
lint:
17+
name: PHP Lint
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Bun
25+
uses: oven-sh/setup-bun@v2
26+
with:
27+
bun-version: latest
28+
29+
- name: Install dependencies
30+
run: bun install
31+
32+
- name: Run PHP linting
33+
run: bun run lint
34+

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-release:
10+
name: Build and Create Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Bun
20+
uses: oven-sh/setup-bun@v2
21+
with:
22+
bun-version: latest
23+
24+
- name: Install dependencies
25+
run: bun install
26+
27+
- name: Run linting
28+
run: bun run lint
29+
30+
- name: Build bundle
31+
run: bun run bundle
32+
33+
- name: Extract version from tag
34+
id: tag_version
35+
run: |
36+
TAG_NAME=${GITHUB_REF#refs/tags/}
37+
echo "version=${TAG_NAME#v}" >> $GITHUB_OUTPUT
38+
echo "tag=${TAG_NAME}" >> $GITHUB_OUTPUT
39+
40+
- name: Create Release
41+
uses: softprops/action-gh-release@v2
42+
with:
43+
files: navsweeper.zip
44+
name: Release ${{ steps.tag_version.outputs.tag }}
45+
body: |
46+
## NavSweeper ${{ steps.tag_version.outputs.version }}
47+
48+
See the [changelog](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.
49+
draft: false
50+
prerelease: false
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+

0 commit comments

Comments
 (0)