publish-package #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish-package | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
release-plugin: | |
runs-on: macos-latest | |
env: | |
PLUGIN_VERSION: | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Extract version | |
id: version | |
working-directory: ./plugin | |
run: echo "PLUGIN_VERSION=$(jq .Version com.dim.streamdeck.sdPlugin/manifest.json -r)" >> $GITHUB_ENV | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: true | |
- name: Build property inspector | |
working-directory: ./property-inspector/ | |
run: pnpm build | |
env: | |
VITE_DISCORD: ${{secrets.VITE_DISCORD}} | |
VITE_PATREON: ${{secrets.VITE_PATREON}} | |
VITE_AXIOM_DATASET: ${{secrets.VITE_AXIOM_DATASET}} | |
VITE_AXIOM_TOKEN: ${{secrets.VITE_AXIOM_TOKEN}} | |
VITE_CHECKPOINTS_GIST: ${{secrets.VITE_CHECKPOINTS_GIST}} | |
VITE_CHECKPOINTS: ${{secrets.VITE_CHECKPOINTS}} | |
- name: Download rust artifacts | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
github_token: ${{secrets.SECRET_TOKEN}} | |
workflow: build-rust-packages.yaml | |
- name: Prepare plugin directory | |
run: | | |
mkdir -p plugin/com.dim.streamdeck.sdPlugin/solo-mode | |
mkdir -p plugin/com.dim.streamdeck.sdPlugin/macro | |
mv service-installer/install-sd-solo-mode.exe plugin/com.dim.streamdeck.sdPlugin/solo-mode/ | |
mv service-remover/remove-sd-solo-mode.exe plugin/com.dim.streamdeck.sdPlugin/solo-mode/ | |
mv service/sd-solo-mode.exe plugin/com.dim.streamdeck.sdPlugin/solo-mode/ | |
mv macro/macro.exe plugin/com.dim.streamdeck.sdPlugin/macro/macro.exe | |
- name: Build plugin | |
working-directory: ./plugin | |
run: pnpm build | |
env: | |
CHECKPOINT_API: ${{secrets.CHECKPOINT_API}} | |
AXIOM_DATASET: ${{secrets.VITE_AXIOM_DATASET}} | |
AXIOM_TOKEN: ${{secrets.VITE_AXIOM_TOKEN}} | |
- name: Publish package | |
uses: ncipollo/[email protected] | |
with: | |
name: "${{ env.PLUGIN_VERSION }}" | |
prerelease: false | |
makeLatest: true | |
allowUpdates: true | |
bodyFile: "./changelogs/${{ env.PLUGIN_VERSION }}.md" | |
tag: "${{ env.PLUGIN_VERSION }}" | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
artifacts: "./plugin/com.dim.streamdeck.streamDeckPlugin" |