-
Notifications
You must be signed in to change notification settings - Fork 3
71 lines (61 loc) · 1.84 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# this is the release workflow that is triggered by a push to main or develop branches
# it will
# - build the project
# - @TODO: save the artifacts to the workflow
# - @TODO: create a GitHub releases with changelog and upload the artifacts
#
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"
name: build_project
id: build_project
with:
runCmd: |
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: gather_builded_directories
name: gather 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.gather_builded_directories.outputs.runCmdOutput }}
EOF