2024-01-16 11:35:57 +00:00
|
|
|
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
|
2024-01-16 13:09:29 +00:00
|
|
|
container: node:lts-alpine
|
2024-01-16 11:35:57 +00:00
|
|
|
steps:
|
2024-01-16 13:09:29 +00:00
|
|
|
- run: apk add git
|
2024-01-16 11:35:57 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- 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 }}
|
2024-01-16 13:14:58 +00:00
|
|
|
- name: Set Yarn package install mode
|
|
|
|
run: |
|
|
|
|
yarn config set enableGlobalCache false
|
|
|
|
yarn config set nodeLinker node-modules
|
2024-01-16 11:35:57 +00:00
|
|
|
- name: Install dependencies
|
2024-01-16 13:00:23 +00:00
|
|
|
uses: borales/actions-yarn@v4.2.0
|
2024-01-16 11:35:57 +00:00
|
|
|
with:
|
|
|
|
cmd: install
|
|
|
|
|
|
|
|
- name: Build app using CI script
|
2024-01-16 13:00:23 +00:00
|
|
|
uses: borales/actions-yarn@v4.2.0
|
2024-01-16 11:35:57 +00:00
|
|
|
with:
|
|
|
|
cmd: gitea-ci-script
|
|
|
|
|
|
|
|
- name: Archive Yarn build artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: built-app
|
|
|
|
path: ${{ inputs.yarn-output }}
|