Skip to content

Commit e92c5a4

Browse files
authored
Merge pull request #1 from AleixMT/main
Automatic GitHub releases and minor quality of life updates
2 parents 4ca89a2 + 5e70a07 commit e92c5a4

7 files changed

Lines changed: 176 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build and Release VSCode Extension in GitHub
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on pushes to the main branch
7+
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
outputs:
13+
current_version: ${{ steps.compute_version.outputs.current_version }}
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
with:
19+
token: ${{ secrets.GH_TOKEN }}
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
26+
- name: Install vsce
27+
run: npm install -g @vscode/vsce
28+
29+
- name: Bump Version
30+
id: compute_version
31+
run: |
32+
git config user.name "github-actions"
33+
git config user.email "github-actions@github.com"1
34+
CURRENT_VERSION=$(node -p "require('./package.json').version")
35+
echo "Current version: $CURRENT_VERSION"
36+
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
37+
38+
- name: Build VSIX Package
39+
run: vsce package --out arm-syntax-vscode-extension-${{ env.current_version }}.vsix
40+
41+
release:
42+
name: Release
43+
runs-on: ubuntu-latest
44+
needs: build
45+
46+
steps:
47+
- name: Create GitHub Release
48+
uses: ncipollo/release-action@v1
49+
with:
50+
artifacts: arm-syntax-vscode-extension-${{ needs.build.outputs.current_version }}.vsix
51+
tag: v${{ needs.build.outputs.current_version }}
52+
name: "Release v${{ needs.build.outputs.current_version }}"
53+
body: "Automated release of version v${{ needs.build.outputs.current_version }}"
54+
allowUpdates: true
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
57+
58+

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
TODO.md
22
.vscode/
3-
images/
3+
4+
*.vsix
5+

.vscodeignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
.vscode-test/**
33
.gitignore
44
vsc-extension-quickstart.md
5+
makefile
6+
.github/
7+

README.md

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![VSCode extensions marketplace][vscode-shield]][vscode-url]
2+
13
# ARM Syntax README
24

35
## Author
@@ -10,7 +12,7 @@ Javier Mejias Reverté
1012
## Features
1113

1214
Color Syntax Highlighting for ARM Assembly (keywords from **The ARM Instruction Set - ARM University Program - V1.0</**)
13-
Instruction Set is adapted for **URV - ETSE - DEIM - Computadors**
15+
Instruction Set is adapted for **URV - ETSE - DEIM - Fonaments de Computadors - Computadors - Estructura de Sistemes Operatius**
1416

1517
Color Syntax Highlighting is applied to the following file extensions:
1618
- .s
@@ -24,18 +26,64 @@ Configurable color, bold, italic for each keyword type.
2426

2527
## Installing
2628

29+
### Requirements
30+
31+
None required.
32+
2733
### From VSCode
2834

2935
1. Open **Extensions** in VSCode
3036
2. Click the **"..."** button at the top right of the Extensions window
3137
3. Select **Install from VSIX**
3238
4. Choose your **.vsix file**
3339

40+
### From shell
41+
42+
1. Open terminal with `Ctrl` + `Alt` + `T` or by opening the Terminal application.
43+
2. Type the following commands:
44+
```shell
45+
LATEST_VERSION=$(curl -s https://api.github.com/repos/ininavicode/arm-syntax-vscode-extension/releases/latest | grep "tag_name" | cut -d '"' -f 4)
46+
LATEST_VERSION=${VERSION:1}
47+
wget -O arm-syntax-vscode-extension.vsix \
48+
https://github.com/ininavicode/arm-syntax-vscode-extension/releases/download/v${LATEST_VERSION}/arm-syntax-vscode-extension-${LATEST_VERSION}.vsix # Download latest release
49+
code --install-extension arm-syntax-vscode-extension.vsix # Install extension
50+
```
51+
3452
---
3553

36-
## Requirements
54+
## Building
3755

38-
None required.
56+
### Requirements
57+
58+
* [![nodejs][nodejs-shield]][nodejs-url]
59+
* [![vsce][vsce-shield]][vsce-url]
60+
61+
### Install build requirements
62+
63+
```shell
64+
# Install node version manager
65+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
66+
67+
# Set up nvm to use nodeJS 20.x.x
68+
nvm install 20
69+
nvm use 20
70+
71+
# Install vsce
72+
npm install -g @vscode/vsce
73+
```
74+
75+
### Build instructions
76+
77+
```shell
78+
# Clone repo
79+
git clone https://github.com/ininavicode/arm-syntax-vscode-extension
80+
81+
# Navigate inside the folder
82+
cd arm-syntax-vscode-extension
83+
84+
# Build extension
85+
vsce package --out arm-syntax-vscode-extension.vsix
86+
```
3987

4088
---
4189

@@ -76,3 +124,13 @@ Changed default colors
76124

77125
### V0.0.5
78126
Fixed error detecting inmediate values.
127+
128+
129+
130+
[nodejs-shield]: https://img.shields.io/badge/nodeJS-20.x.x-orange?style=for-the-badge&logo=nodedotjs&logoColor=white
131+
[nodejs-url]: https://nodejs.org/en
132+
[vsce-shield]: https://img.shields.io/badge/vsce-3.2.1-white?style=for-the-badge&logo=vscodium&logoColor=black
133+
[vsce-url]: https://github.com/microsoft/vscode-vsce
134+
[vscode-shield]: https://img.shields.io/visual-studio-marketplace/i/ininavicode.arm-syntax?label=VSCode%20marketplace%20installations
135+
[vscode-url]: https://marketplace.visualstudio.com/items?itemName=ininavicode.arm-syntax
136+

images/logo.png

7.95 KB
Loading

makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Variables
2+
EXTENSION_NAME := arm-syntax-vscode-extension
3+
VSIX_FILE := $(EXTENSION_NAME).vsix
4+
5+
# Default target
6+
.PHONY: all
7+
all: $(VSIX_FILE)
8+
9+
10+
# Build the VSCode extension (only if VSIX does not exist)
11+
$(VSIX_FILE): package.json CHANGELOG.md extension.js language-configuration.json LICENSE README.md images/logo.png syntaxes/arm.tmLanguage.json
12+
@echo "🔨 Building the VSCode extension..."
13+
@npm install
14+
@vsce package --out $(VSIX_FILE)
15+
@echo "✅ Build complete: $(VSIX_FILE)"
16+
17+
## Install the VSCode extension
18+
.PHONY: install
19+
install: $(VSIX_FILE)
20+
@echo "🚀 Installing the VSCode extension..."
21+
@code --install-extension $(VSIX_FILE) --force
22+
@echo "✅ Extension installed."
23+
24+
## Uninstall the VSCode extension
25+
.PHONY: uninstall
26+
uninstall: $(VSIX_FILE)
27+
@echo "🗑️ Uninstalling the VSCode extension..."
28+
@code --uninstall-extension $(VSIX_FILE)
29+
@echo "✅ Extension uninstalled."
30+
31+
## Clean generated files
32+
.PHONY: clean
33+
clean:
34+
@echo "🧹 Cleaning build artifacts..."
35+
@rm -f $(VSIX_FILE)
36+
@echo "✅ Clean complete."

package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)