-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
163 additions
and
0 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,36 @@ | ||
name: 🏭 Build Plugin | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build-plugin: | ||
if: github.repository == 'open-goal/decky-plugin' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "main" | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
- name: Install Dependencies | ||
run: | | ||
mkdir ./cli | ||
curl -L -o ./cli/decky "https://github.com/SteamDeckHomebrew/cli/releases/latest/download/decky" | ||
chmod +x ./cli/decky | ||
- name: Create Plugin | ||
run: sudo ./cli/decky plugin build ./ |
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,127 @@ | ||
name: 🏭 Create Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
bump: | ||
description: "Semver Bump Type" | ||
required: true | ||
default: "patch" | ||
type: choice | ||
options: | ||
- "patch" | ||
- "minor" | ||
- "major" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
create-tag: | ||
if: github.repository == 'open-goal/decky-plugin' | ||
name: "Create New Tag" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
new_tag: ${{ steps.version_bump.outputs.new_tag }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# TODO - still have to use PAT to bypass branch protections | ||
# https://github.com/orgs/community/discussions/13836 | ||
with: | ||
token: ${{ secrets.BOT_PAT }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
- name: Bump Version | ||
id: version_bump | ||
run: | | ||
yarn version --${{ github.event.inputs.bump }} --no-git-tag-version | ||
echo "new_tag=v${NEW_VERSION}" >> $GITHUB_OUTPUT | ||
- name: Commit Version Bump | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actor | ||
author_name: "OpenGOALBot" | ||
author_email: "OpenGOALBot@users.noreply.github.com" | ||
message: "release: bump to version - ${{ steps.version_bump.outputs.new_tag }}" | ||
tag: "${{ steps.version_bump.outputs.new_tag }}" | ||
|
||
create-release: | ||
needs: [create-tag] | ||
if: github.repository == 'open-goal/decky-plugin' | ||
name: "Create Release" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "main" | ||
|
||
# Create the release, use `gh` CLI so we can auto generate the notes | ||
- name: Create Release | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh release create ${{needs.create-tag.outputs.new_tag}} --generate-notes --draft --repo open-goal/decky-plugin | ||
build-plugin: | ||
if: github.repository == 'open-goal/decky-plugin' | ||
needs: [create-release] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "main" | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
- name: Install Dependencies | ||
run: | | ||
mkdir ./cli | ||
curl -L -o ./cli/decky "https://github.com/SteamDeckHomebrew/cli/releases/latest/download/decky" | ||
chmod +x ./cli/decky | ||
- name: Create Plugin | ||
run: sudo ./cli/decky plugin build ./ | ||
|
||
publish-release: | ||
if: github.repository == 'open-goal/decky-plugin' | ||
needs: [create-release, build-plugin] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "main" | ||
# TODO - still have to use PAT to bypass branch protections | ||
# https://github.com/orgs/community/discussions/13836 | ||
token: ${{ secrets.BOT_PAT }} | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
# - name: update release metadata and publish the release | ||
# env: | ||
# RELEASE_ID: ${{needs.create-release.outputs.release_id}} | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: | | ||
# yarn install --frozen-lockfile | ||
# yarn update-release-meta | ||
|
||
# - name: commit release metadata change | ||
# uses: EndBug/add-and-commit@v9 | ||
# with: | ||
# default_author: github_actor | ||
# author_name: "OpenGOALBot" | ||
# author_email: "OpenGOALBot@users.noreply.github.com" | ||
# message: "release: update release metadata to latest" |