generated from BigfootDS/Sourcepool-Server-Plugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reference the plugin metadata when doing boilerplate logging
- Loading branch information
1 parent
ecea5f8
commit e232442
Showing
2 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Generate output for download | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
draft_release: | ||
permissions: | ||
contents: write | ||
name: Create Draft Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release_id: ${{ steps.create_release.outputs.id }} | ||
release_version: ${{ steps.tag.outputs.new_tag }} | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
semver_commit_hash: ${{ steps.semver_commit.outputs.commit_hash }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
|
||
- name: Bump version and push tag | ||
id: tag | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: "minor" | ||
|
||
- name: Bump package.json version | ||
id: npm-version | ||
uses: reedyuk/npm-version@master | ||
with: | ||
version: ${{ steps.tag.outputs.new_version }} | ||
|
||
- name: Commit semver changes to repo | ||
id: semver_commit | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
branch: main | ||
|
||
|
||
- name: Create Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.github_token }} | ||
with: | ||
tag_name: ${{ steps.tag.outputs.new_tag }} | ||
name: ${{ steps.tag.outputs.new_tag }} | ||
body: ${{ steps.tag.outputs.changelog }} | ||
draft: true | ||
prerelease: false | ||
|
||
generate_output: | ||
needs: [draft_release] | ||
name: Gather plugin code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.draft_release.outputs.semver_commit_hash }} | ||
|
||
- name: Set up NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
|
||
- name: Upload Output to Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ needs.draft_release.outputs.release_version }} | ||
draft: true | ||
|
||
make_release: | ||
needs: [draft_release, generate_output] | ||
name: Publish the Draft Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout GitHub Action | ||
uses: actions/checkout@v4 | ||
|
||
- name: Mark release as published | ||
uses: eregon/publish-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_id: ${{ needs.draft_release.outputs.release_id }} |
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