Skip to content

Commit 10c9902

Browse files
committed
added github workflow
1 parent 7d54a7e commit 10c9902

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Release Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: '16'
19+
cache: 'npm'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Install vsce
25+
run: npm install -g @vscode/vsce
26+
27+
- name: Package extension
28+
run: vsce package
29+
30+
- name: Get version from tag
31+
id: get_version
32+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
33+
34+
- name: Create Release
35+
id: create_release
36+
uses: softprops/action-gh-release@v1
37+
with:
38+
files: ps1-dev-extension-*.vsix
39+
name: Release ${{ steps.get_version.outputs.VERSION }}
40+
draft: false
41+
prerelease: false
42+
generate_release_notes: true
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

RELEASE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Release Process
2+
3+
This document describes how to create a new release of the PS1 Development Extension.
4+
5+
## Automated Release Process
6+
7+
The extension uses GitHub Actions to automate the build and release process.
8+
9+
### Creating a New Release
10+
11+
1. Update the version number in `package.json`
12+
2. Commit your changes
13+
3. Create and push a new tag with the version number:
14+
15+
```bash
16+
git tag v0.1.0 # Replace with your version
17+
git push origin v0.1.0
18+
```
19+
20+
4. The GitHub Action will automatically:
21+
- Build the extension
22+
- Package it as a VSIX file
23+
- Create a GitHub Release with the VSIX file attached
24+
25+
### Release Workflow Details
26+
27+
The workflow is defined in `.github/workflows/release.yml` and is triggered when a tag starting with 'v' is pushed to the repository.
28+
29+
## Manual Release Process
30+
31+
If you need to create a release manually:
32+
33+
1. Update the version number in `package.json`
34+
2. Run the packaging script:
35+
36+
```bash
37+
./package-extension.ps1
38+
```
39+
40+
3. The VSIX file will be created in the root directory
41+
4. Upload this file to a GitHub Release manually

0 commit comments

Comments
 (0)