Skip to content

Testing Packages

Testing Packages #59

Workflow file for this run

name: Testing Packages
on:
- workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
outputs:
version: ${{ steps.version.outputs.version }}
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: "false"
YARN_NPM_AUTH_TOKEN: ${{ github.token }}
YARN_NPM_PUBLISH_REGISTRY: https://npm.pkg.github.com
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- uses: actions/cache@v4
with:
path: .yarn/cache
key: yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-
- uses: actions/cache@v4
with:
path: |
~/.zig-build
~/.cache/zig
key: zig-${{ hashFiles('yarn.lock') }}
restore-keys: |
zig-
- name: Prepare to publish
run: |
rm yarn.lock
git grep -Ilz '@solarwinds-apm/' | xargs -0 sed -ie 's:@solarwinds-apm/:@${{ github.repository_owner }}/solarwinds-apm-:g'
git grep -Ilz -G 'solarwinds-apm[^-]' | xargs -0 sed -rie 's:solarwinds-apm([^-]):@${{ github.repository_owner }}/solarwinds-apm\1:g'
yarn install
yarn version:testing
yarn install
- run: yarn publish
- name: Export version
id: version
run: |
VERSION=$(cat packages/solarwinds-apm/package.json | jq -r '.version')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
lambda:
needs: publish
uses: ./.github/workflows/lambda.yml
with:
type: testing
version: ${{ needs.publish.outputs.version }}
secrets: inherit