Skip to content

Commit f9fd449

Browse files
feat: setup release automation
- Removed incorrect npm publish workflow - Added GitHub Release workflow for building and zipping assets - Added PUBLISHING.md documentation
1 parent 52642af commit f9fd449

3 files changed

Lines changed: 65 additions & 36 deletions

File tree

.github/workflows/npm-publish-github-packages.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release App
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- name: Install Dependencies
25+
run: npm ci
26+
27+
- name: Build Application
28+
run: npm run build
29+
30+
- name: Archive Production Artifact
31+
run: |
32+
zip -r open-temp-mail-${{ github.ref_name }}.zip dist
33+
34+
- name: Create Release
35+
uses: softprops/action-gh-release@v1
36+
with:
37+
files: open-temp-mail-${{ github.ref_name }}.zip
38+
generate_release_notes: true

PUBLISHING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Publishing a New Release
2+
3+
This project uses **GitHub Actions** to automatically build and release the application.
4+
5+
## How to Create a Release
6+
7+
1. **Update Version**: Bump the version in `package.json` (e.g., `1.0.0` -> `1.0.1`).
8+
2. **Commit**: Commit the change.
9+
```bash
10+
git commit -am "chore: bump version to 1.0.1"
11+
```
12+
3. **Tag**: Create a new tag starting with `v`.
13+
```bash
14+
git tag v1.0.1
15+
```
16+
4. **Push**: Push the commit and the tag to GitHub.
17+
```bash
18+
git push && git push --tags
19+
```
20+
21+
## What Happens Next?
22+
23+
- GitHub Actions will detect the new tag.
24+
- It will build the project (`npm run build`).
25+
- It will zip the `dist/` folder.
26+
- It will create a new **Release** in the GitHub repository.
27+
- The zipped assets will be attached to the release for download.

0 commit comments

Comments
 (0)