Skip to content

Commit

Permalink
ci: publish library packages
Browse files Browse the repository at this point in the history
  • Loading branch information
niekcandaele committed May 29, 2024
1 parent 7685ccc commit 497d763
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/publish-libs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish libs

#on:
# release:
# types: [published]
on:
push:
branches:
- '**'
jobs:
publish:
name: Publish packages
runs-on: ubuntu-latest
strategy:
matrix:
package:
[
{ name: 'lib-apiclient' },
{ name: 'lib-auth' },
{ name: 'lib-aws' },
{ name: 'lib-components' },
{ name: 'lib-config' },
{ name: 'lib-db' },
{ name: 'lib-email' },
{ name: 'lib-function-helpers' },
{ name: 'lib-gameserver' },
{ name: 'lib-http' },
{ name: 'lib-modules' },
{ name: 'lib-queues' },
{ name: 'lib-util' },
]

steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.TAKARO_CI_APP_ID }}
private_key: ${{ secrets.TAKARO_CI_APP_PRIV_KEY }}

- name: Checkout code
uses: actions/checkout@v2
with:
token: ${{ steps.generate_token.outputs.token }}

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.18
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'

- run: ./scripts/dev-init.sh

- run: npm -w ${{ matrix.package.name }} publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ steps.generate_token.outputs.token }}

0 comments on commit 497d763

Please sign in to comment.