From 646b4a5e486127b2328fef35c837681b2f7cb41f Mon Sep 17 00:00:00 2001 From: Pal Kerecsenyi Date: Tue, 16 Jan 2024 11:35:57 +0000 Subject: [PATCH] Add yarn packages --- .github/workflows/yarn.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/yarn.yml diff --git a/.github/workflows/yarn.yml b/.github/workflows/yarn.yml new file mode 100644 index 0000000..fb83691 --- /dev/null +++ b/.github/workflows/yarn.yml @@ -0,0 +1,44 @@ +name: Yarn +on: + workflow_call: + secrets: + NPM_AUTH_TOKEN: + required: true + inputs: + yarn-output: + type: string + required: true + +jobs: + yarn-install: + name: Install Yarn dependencies + runs-on: ubuntu-latest + container: node:lts-alpine + steps: + - uses: actions/checkout@v3 + - name: Set Node.js 20.x + uses: actions/setup-node@v3 + with: + node-version: 20.x + - name: Set Yarn authentication + run: | + yarn config set npmScopes.paltiverse.npmRegistryServer https://gitea.palk.me/api/packages/paltiverse/npm/ + yarn config set npmScopes.paltiverse.npmAlwaysAuth true + yarn config set npmScopes.paltiverse.npmAuthToken $NPM_AUTH_TOKEN + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + - name: Install dependencies + uses: borales/actions-yarn@v4 + with: + cmd: install + + - name: Build app using CI script + uses: borales/actions-yarn@v4 + with: + cmd: gitea-ci-script + + - name: Archive Yarn build artifacts + uses: actions/upload-artifact@v3 + with: + name: built-app + path: ${{ inputs.yarn-output }}