diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fa72c92 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,58 @@ +name: Build and Release VSCode Extension in GitHub + +on: + push: + branches: + - main # Trigger on pushes to the main branch + +jobs: + build: + name: Build + runs-on: ubuntu-latest + outputs: + current_version: ${{ steps.compute_version.outputs.current_version }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install vsce + run: npm install -g @vscode/vsce + + - name: Bump Version + id: compute_version + run: | + git config user.name "github-actions" + git config user.email "github-actions@github.com"1 + CURRENT_VERSION=$(node -p "require('./package.json').version") + echo "Current version: $CURRENT_VERSION" + echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT + + - name: Build VSIX Package + run: vsce package --out arm-syntax-vscode-extension-${{ env.current_version }}.vsix + + release: + name: Release + runs-on: ubuntu-latest + needs: build + + steps: + - name: Create GitHub Release + uses: ncipollo/release-action@v1 + with: + artifacts: arm-syntax-vscode-extension-${{ needs.build.outputs.current_version }}.vsix + tag: v${{ needs.build.outputs.current_version }} + name: "Release v${{ needs.build.outputs.current_version }}" + body: "Automated release of version v${{ needs.build.outputs.current_version }}" + allowUpdates: true + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + + diff --git a/.gitignore b/.gitignore index fb33025..c50573c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ TODO.md .vscode/ -images/ \ No newline at end of file + +*.vsix + diff --git a/.vscodeignore b/.vscodeignore index f369b5e..9a94e91 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -2,3 +2,6 @@ .vscode-test/** .gitignore vsc-extension-quickstart.md +makefile +.github/ + diff --git a/README.md b/README.md index 3ac5dee..5adaa86 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![VSCode extensions marketplace][vscode-shield]][vscode-url] + # ARM Syntax README ## Author @@ -10,7 +12,7 @@ Javier Mejias Revertรฉ ## Features Color Syntax Highlighting for ARM Assembly (keywords from **The ARM Instruction Set - ARM University Program - V1.0