Skip to content

Commit f5fd213

Browse files
authored
Merge pull request #30 from InterestingSoftware/copilot/fix-release-step-main-branch
fix(ci): restore automatic tag+release creation on main pushes
2 parents f087361 + 68a7c28 commit f5fd213

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ jobs:
250250
# ── Release ───────────────────────────────────────────────────────────────
251251
release:
252252
name: Create release
253-
if: startsWith(github.ref, 'refs/tags/v')
253+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
254254
needs: [build, e2e]
255255
runs-on: ubuntu-latest
256256
permissions:
@@ -262,6 +262,8 @@ jobs:
262262
merge-multiple: true
263263
- uses: softprops/action-gh-release@v2
264264
with:
265+
tag_name: ${{ github.ref == 'refs/heads/main' && format('main-{0}', github.run_number) || github.ref_name }}
266+
name: ${{ github.ref == 'refs/heads/main' && format('Main build {0}', github.run_number) || github.ref_name }}
265267
files: artifacts/**
266268
generate_release_notes: true
267-
prerelease: ${{ contains(github.ref_name, '-') }}
269+
prerelease: ${{ github.ref == 'refs/heads/main' || contains(github.ref_name, '-') }}

0 commit comments

Comments
 (0)