From 6b8fec09bd5df52c2ee2de5f3d79ed36ee680cc3 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sun, 17 Aug 2025 14:05:47 +0200 Subject: [PATCH] ci: add release workflow --- .github/workflows/release.yaml | 40 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..f2426a04 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,40 @@ +name: Release + +permissions: {} + +on: + repository_dispatch: + types: [trigger-release] + +jobs: + release: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [22] + steps: + - name: Obtain token + id: obtainToken + uses: tibdex/github-app-token@v2 + with: + private_key: ${{ secrets.HOMARR_DOCS_RELEASE_APP_PRIVATE_KEY }} + app_id: ${{ vars.HOMARR_DOCS_RELEASE_APP_ID }} + - name: Checkout code + env: + GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }} + uses: actions/checkout@v5 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - run: pnpm install + - run: | + RAW_TAG="${{ github.event.client_payload.tag }}" + CLEAN_TAG="${RAW_TAG#v}" + pnpm run docusaurus docs:version $CLEAN_TAG + - uses: EndBug/add-and-commit@v9 + with: + default_author: github_actor + message: 'docs: add version ${{ github.event.client_payload.tag }}' + push: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index b81c772c..8708641b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /node_modules /.pnp .pnp.js +.pnpm-store/ # testing /coverage