This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
build-plugin #102
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: build-plugin | |
on: | |
workflow_dispatch: | |
inputs: | |
ci: | |
description: 'Run CI' | |
type: boolean | |
default: true | |
sha_short: | |
description: 'sha_short' | |
required: true | |
new_tag: | |
description: 'new_tag' | |
required: true | |
new_tag_short: | |
description: 'new_tag_short' | |
required: true | |
name: | |
description: 'name' | |
required: true | |
sha: | |
description: 'sha' | |
required: true | |
repository_dispatch: | |
types: [build-server] | |
jobs: | |
ci-plugin: | |
if: ${{ github.event.inputs.ci }} | |
uses: ./.github/workflows/ci-plugin.yml | |
release-nightly: | |
name: Release nightly/rc | |
runs-on: ubuntu-latest | |
needs: [ci-plugin] | |
if: ${{ !failure() && github.event.inputs.name != 'blank' }} | |
env: | |
ARTIFACT: plateau-plugin_${{ github.event.inputs.name }}.zip | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: plateau-plugin | |
path: plateau-plugin/ | |
- name: Zip | |
run: zip -r $ARTIFACT plateau-plugin/ | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: ${{ env.ARTIFACT }} | |
artifactContentType: application/zip | |
commit: ${{ github.event.inputs.sha }} | |
name: ${{ github.event.inputs.name }} | |
tag: ${{ github.event.inputs.name }} | |
body: ${{ github.event.inputs.sha }} | |
prerelease: true | |
release: | |
name: Release version zip | |
runs-on: ubuntu-latest | |
needs: [ci-plugin] | |
if: ${{ !failure() && github.event.inputs.new_tag != 'blank' }} | |
env: | |
ARTIFACT: plateau-plugin_${{ github.event.inputs.name }} | |
steps: | |
- name: Fetch plateau-plugin release | |
uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
version: tags/rc | |
file: plateau-plugin_rc.zip | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Rename artifact | |
run: mv plateau-plugin_rc.zip $ARTIFACT | |
- name: Download latest changelog | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: release.yml | |
name: changelog-${{ github.event.inputs.new_tag }} | |
- name: Create GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: ${{ env.ARTIFACT }} | |
artifactContentType: application/zip | |
commit: ${{ github.event.inputs.sha }} | |
name: ${{ github.event.inputs.new_tag }} | |
tag: ${{ github.event.inputs.new_tag }} | |
bodyFile: CHANGELOG_latest.md |