Skip to content

fix builder

fix builder #221

Workflow file for this run

name: Autobuild Plugins
# Controls when the action will run.
on:
push:
branches:
- development
workflow_dispatch:
inputs:
plugin:
description: What plugin to build. Omit for all.
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: compile plugins
runs-on: ubuntu-latest
steps:
- name: clean working directory
run: rm -rf /home/runner/work/${{ github.repository }}
- name: checkout code
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: setup nodejs
uses: actions/setup-node@v2
with:
node-version: 16.x
#- name: install pnpm
# run: |
# npm i -g pnpm
- name: setup env
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GH_NPM_TOKEN }}" >> .npmrc
echo '@betterdiscordbuilder:registry=https://npm.pkg.github.com' >> .npmrc
- name: install latest bdbuilder version
run: |
npm i -D @betterdiscordbuilder/bdbuilder@latest
- name: detect changed files
id: files
uses: jitterbit/get-changed-files@v1
continue-on-error: true # needed for force-push support
- name: build plugins
run: >-
.github/workflows/run-bdbuilder
"--trigger=${{ github.event_name }}"
"--plugin=${{ github.event.inputs.plugin }}"
${{ steps.files.outputs.all }}
- name: stage build
uses: actions/upload-artifact@v2
with:
name: build-artifact
path: .
retention-days: 1
publish:
name: publish plugins
runs-on: ubuntu-latest
needs: build
steps:
- name: restore repo
uses: actions/checkout@v2
with:
ref: master
- name: apply build
uses: actions/download-artifact@v2
with:
name: build-artifact
path: .
- name: commit
run: |
git config advice.addIgnoredFile false
git add --no-all ./**
git config --local user.email "[email protected]"
git config --local user.name "PluginBuilder"
git commit -m "publish build" || true
- name: push
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: master # *release* branch