wipo : fix GitHub workflow #66
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: 'release' | |
on: | |
# rebuild any PRs and main branch changes | |
pull_request: | |
push: | |
branches: | |
- main | |
- develop | |
permissions: | |
# write-all is too much, but we need to write to packages | |
# see https://github.com/orgs/community/discussions/57724 for more info | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
jobs: | |
build_devcontainer_image: | |
uses: ./.github/workflows/build-devcontainer-image.yaml | |
secrets: inherit | |
build: | |
runs-on: ubuntu-latest | |
needs: | |
- build_devcontainer_image | |
steps: | |
- name: checkout branch from git | |
uses: actions/checkout@v4 | |
- name: display output name | |
run: echo "image_name=${{ needs.build_devcontainer_image.outputs.image_name }}" | |
- uses: "./.github/shared/actions/devcontainer-shell-run" | |
id: build_project | |
with: | |
runCmd: | | |
pnpm --version | |
pnpm exec node --version | |
# pnpm store seems to be installed in the image in some cases | |
echo 'y' | pnpm install --frozen-lockfile | |
echo "WP_ENV_HOME=${WP_ENV_HOME} !" | |
pnpm build | |
- name: print output | |
run: | | |
cat <<EOF | |
stdout was= | |
${{ steps.build_project.outputs.runCmdOutput }}" | |
EOF | |
- uses: "./.github/shared/actions/devcontainer-shell-run" | |
id: list_builded_directories | |
with: | |
runCmd: | | |
find ./packages -mindepth 3 -maxdepth 3 -type d -name "dist" -exec ls -la {} \; | |
- name: print build directories | |
run: | | |
cat <<EOF | |
stdout was= | |
${{ steps.list_builded_directories.outputs.runCmdOutput }} | |
EOF |