Testing Packages #61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
submodules: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://npm.pkg.github.com | |
- 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 | |
env: | |
YARN_NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
YARN_NPM_PUBLISH_REGISTRY: https://npm.pkg.github.com | |
- 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 |