publish-package #93
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)" | rev | cut -c3- | rev >> $GITHUB_ENV | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 9.5 | |
run_install: true | |
# - name: Download rust artifacts | |
# uses: dawidd6/action-download-artifact@v2 | |
# with: | |
# github_token: ${{secrets.GITHUB_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 | |
wget https://github.com/dim-stream-deck/prebuilt-binaries/raw/refs/heads/main/prebuilt/install-sd-solo-mode.exe -P plugin/com.dim.streamdeck.sdPlugin/solo-mode/ | |
wget https://github.com/dim-stream-deck/prebuilt-binaries/raw/refs/heads/main/prebuilt/remove-sd-solo-mode.exe -P plugin/com.dim.streamdeck.sdPlugin/solo-mode/ | |
wget https://github.com/dim-stream-deck/prebuilt-binaries/raw/refs/heads/main/prebuilt/sd-solo-mode.exe -P plugin/com.dim.streamdeck.sdPlugin/solo-mode/ | |
wget https://github.com/dim-stream-deck/prebuilt-binaries/raw/refs/heads/main/prebuilt/macro.exe -P plugin/com.dim.streamdeck.sdPlugin/macro/ | |
- name: Build | |
working-directory: . | |
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}} | |
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" |