Skip to content

Commit 6c2bd36

Browse files
committed
Add GitHub Actions release workflow and bump version
Introduces a GitHub Actions workflow to automate releases on tag push, including building and archiving the project. Also updates the package version to 3.0.0 in package.json.
1 parent 19c8baa commit 6c2bd36

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Create GitHub Release
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
package_json_file: package.json
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
cache: pnpm
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Build
31+
run: pnpm build
32+
33+
- name: Create release archive
34+
run: tar -czvf crapshack-dot-net.tar.gz dist
35+
36+
- name: Create GitHub Release
37+
env:
38+
GH_TOKEN: ${{ github.token }}
39+
run: |
40+
gh release create ${{ github.ref_name }} \
41+
--title "${{ github.ref_name }}" \
42+
--generate-notes \
43+
crapshack-dot-net.tar.gz

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "crapshack.net-astro",
33
"type": "module",
4-
"version": "0.0.1",
4+
"version": "3.0.0",
55
"scripts": {
66
"dev": "astro dev",
77
"build": "astro build",

0 commit comments

Comments
 (0)