Skip to content

Merge pull request #11 from OurFreeLight/dev #17

Merge pull request #11 from OurFreeLight/dev

Merge pull request #11 from OurFreeLight/dev #17

Workflow file for this run

name: Publish Package
on:
push:
branches:
- main
jobs:
test:
uses: ./.github/workflows/test.yml
secrets: inherit
publish:
needs: test
runs-on: ubuntu-22.04
environment: ${{ github.ref }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up environment variables
run: |
cat << EOF > ./.env
JWT_SECRET_KEY=a9w083j9w873h789w2
AUTO_VERIFY_USERS=0
DISABLE_REHASHING=0
MYSQL_ROOT_PASSWORD=jlka7sw47aSD234
DATABASE_PORT=3324
DATABASE_USERNAME=awuiyh34ygsd
DATABASE_PASSWORD=3ui45hiyuawer
DATABASE_SCHEMA=appdb
EOF
ls -lah ./.env
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Setup .npmrc
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
ls -lah ./.npmrc
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Publish app
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}