46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
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: alpine:3.19
|
|
steps:
|
|
- run: apk add git
|
|
- 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.2.0
|
|
with:
|
|
cmd: install
|
|
|
|
- name: Build app using CI script
|
|
uses: borales/actions-yarn@v4.2.0
|
|
with:
|
|
cmd: gitea-ci-script
|
|
|
|
- name: Archive Yarn build artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: built-app
|
|
path: ${{ inputs.yarn-output }}
|