Skip to content

Commit 51e0e04

Browse files
ci: add release workflow
and clean up test workflow
1 parent b833c34 commit 51e0e04

File tree

2 files changed

+21
-37
lines changed

2 files changed

+21
-37
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
test:
2727
name: Test parser
2828
runs-on: ${{matrix.os}}
29-
if: >-
30-
!github.event.repository.is_template &&
31-
github.event.head_commit.message != 'Initial commit'
3229
strategy:
3330
fail-fast: false
3431
matrix:
@@ -38,38 +35,5 @@ jobs:
3835
uses: actions/checkout@v4
3936
- name: Set up tree-sitter
4037
uses: tree-sitter/setup-action/cli@v1
41-
- name: Check for scanner changes
42-
id: scanner-check
43-
shell: sh
44-
run: |-
45-
{
46-
test -f src/scanner.c && ! git diff --quiet HEAD^ -- "$_" &&
47-
printf 'changed=true\n' || printf 'changed=false\n'
48-
} >> "$GITHUB_OUTPUT"
49-
- name: Fuzz scanner
50-
uses: tree-sitter/fuzz-action@v4
51-
if: steps.scanner-check.outputs.changed == 'true'
52-
- name: Run tests
38+
- name: Run parser tests
5339
uses: tree-sitter/parser-test-action@v2
54-
with:
55-
test-rust: ${{runner.os == 'Linux'}}
56-
fuzz:
57-
name: Fuzz scanner
58-
runs-on: ubuntu-latest
59-
if: >-
60-
!github.event.repository.is_template &&
61-
github.event.head_commit.message != 'Initial commit'
62-
steps:
63-
- name: Checkout repository
64-
uses: actions/checkout@v4
65-
- name: Check for scanner changes
66-
id: scanner-check
67-
shell: sh
68-
run: |-
69-
{
70-
test -f src/scanner.c && ! git diff --quiet HEAD^ -- "$_" &&
71-
printf 'changed=true\n' || printf 'changed=false\n'
72-
} >> "$GITHUB_OUTPUT"
73-
- name: Run fuzzer
74-
uses: tree-sitter/fuzz-action@v4
75-
if: steps.scanner-check.outputs.changed == 'true'

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
7+
concurrency:
8+
group: ${{github.workflow}}-${{github.ref}}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: write
13+
id-token: write
14+
attestations: write
15+
16+
jobs:
17+
release:
18+
uses: tree-sitter/workflows/.github/workflows/release.yml@main
19+
with:
20+
attestations: true

0 commit comments

Comments
 (0)