Skip to content

v1.0.16

v1.0.16 #14

Workflow file for this run

name: Release Package
on:
release:
types: [created]
jobs:
test:
runs-on: ubuntu-22.04
env:
##########################################################################
# App Config
##########################################################################
NEXT_PUBLIC_URL: "http://localhost:3000"
DATABASE_URI: "file:./payload-oauth2.db"
PAYLOAD_SECRET: "hellohereisasecretforyou"
##########################################################################
# Test Config
##########################################################################
# Optional: Set to "true" to run test browser in headless mode
HEADLESS: true
##########################################################################
# Google OAuth Config
##########################################################################
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
##########################################################################
# Google Test Account
##########################################################################
# Required: Google Test Account Email
GOOGLE_TEST_EMAIL: ${{ secrets.GOOGLE_TEST_EMAIL }}
# Required: Google Test Account Password
GOOGLE_TEST_PASSWORD: ${{ secrets.GOOGLE_TEST_PASSWORD }}
##########################################################################
# Zitadel OAuth Config
##########################################################################
ZITADEL_CLIENT_ID: ${{ secrets.ZITADEL_CLIENT_ID }}
ZITADEL_CLIENT_SECRET: ${{ secrets.ZITADEL_CLIENT_SECRET }}
ZITADEL_TOKEN_ENDPOINT: ${{ secrets.ZITADEL_TOKEN_ENDPOINT }}
ZITADEL_AUTHORIZATION_URL: ${{ secrets.ZITADEL_AUTHORIZATION_URL }}
ZITADEL_USERINFO_ENDPOINT: ${{ secrets.ZITADEL_USERINFO_ENDPOINT }}
##########################################################################
# Zitadel Test Account
##########################################################################
# Required: Zitadel Test Account Email
ZITADEL_TEST_EMAIL: ${{ secrets.ZITADEL_TEST_EMAIL }}
# Required: Zitadel Test Account Password
ZITADEL_TEST_PASSWORD: ${{ secrets.ZITADEL_TEST_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- run: pnpm install
- run: |
npx puppeteer browsers install chrome
- name: Run test
run: |
for i in {1..3}; do
echo "Attempt $i"
if pnpm test; then
echo "Success on attempt $i"
exit 0
fi
echo "Attempt $i failed, retrying..."
done
echo "All attempts failed"
exit 1
publish:
needs: test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- run: pnpm install
- run: pnpm build
- name: Configure npm access token via .npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- run: pnpm publish --access public --no-git-checks