Skip to content

Commit

Permalink
Automate build process using GH Actions (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
earlephilhower authored Jun 20, 2024
1 parent 98172af commit 2498c75
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build all and make release on tag

on:
push:
tags:
- '*'

jobs:
build-vsix:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: ./package-lock.json
- name: Install code
run: |
sudo snap install --classic code
- name: Build VSIX
run: |
rm -f *.vsix
vsce package
- name: Upload VSIX
uses: actions/upload-artifact@v4
with:
name: arduino-littlefs-upload.vsix
path: arduino-littlefs-upload*.vsix

make-release:
needs: build-vsix
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: .
- name: Renaming artifacts
run: |
rev=$(git rev-parse --short HEAD)
mkdir release
mkdir tmp && cd tmp && unzip ../arduino-littlefs-upload.vsix.zip/*zip && mv */*vsix ../release/. && cd .. && rm -rf tmp
ls -l release
- name: Drafting release
uses: ncipollo/release-action@v1
with:
artifacts: "release/*"
draft: true
generateReleaseNotes: true

0 comments on commit 2498c75

Please sign in to comment.