Skip to content

Add Napper documentation website with GitHub Pages deployment (#1) #1

Add Napper documentation website with GitHub Pages deployment (#1)

Add Napper documentation website with GitHub Pages deployment (#1) #1

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
build-vsix:
strategy:
matrix:
include:
- rid: osx-arm64
target: darwin-arm64
- rid: osx-x64
target: darwin-x64
- rid: linux-x64
target: linux-x64
- rid: win-x64
target: win32-x64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Build CLI (${{ matrix.rid }})
run: |
dotnet publish src/Nap.Cli/Nap.Cli.fsproj \
-r ${{ matrix.rid }} \
--self-contained \
-p:PublishTrimmed=true \
-p:PublishSingleFile=true \
-o src/Nap.VsCode/bin \
--nologo
- name: Install extension dependencies
working-directory: src/Nap.VsCode
run: npm ci
- name: Compile extension
working-directory: src/Nap.VsCode
run: npx webpack --mode production
- name: Package VSIX (${{ matrix.target }})
working-directory: src/Nap.VsCode
run: npx @vscode/vsce package --target ${{ matrix.target }} --no-dependencies --skip-license
- name: Upload VSIX
uses: actions/upload-artifact@v4
with:
name: vsix-${{ matrix.target }}
path: src/Nap.VsCode/*.vsix
build-cli:
strategy:
matrix:
include:
- rid: osx-arm64
asset: napper-osx-arm64
- rid: osx-x64
asset: napper-osx-x64
- rid: linux-x64
asset: napper-linux-x64
- rid: win-x64
asset: napper-win-x64.exe
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Publish CLI (${{ matrix.rid }})
run: |
dotnet publish src/Nap.Cli/Nap.Cli.fsproj \
-r ${{ matrix.rid }} \
--self-contained \
-p:PublishTrimmed=true \
-p:PublishSingleFile=true \
-o out/${{ matrix.rid }} \
--nologo
- name: Prepare asset
run: |
if [ "${{ matrix.rid }}" = "win-x64" ]; then
mv out/${{ matrix.rid }}/napper.exe ${{ matrix.asset }}
else
mv out/${{ matrix.rid }}/napper ${{ matrix.asset }}
chmod +x ${{ matrix.asset }}
fi
- name: Upload CLI binary
uses: actions/upload-artifact@v4
with:
name: cli-${{ matrix.rid }}
path: ${{ matrix.asset }}
release:
needs: [build-vsix, build-cli]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: assets
merge-multiple: true
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: assets/*