| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
name: Everything (Test, Pack, Release) |
| 9 |
on: |
| 10 |
pull_request: |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
push: |
| 15 |
branches: |
| 16 |
- '**' |
| 17 |
|
| 18 |
env: |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
release_tag: v7.0-alpha.3 |
| 23 |
|
| 24 |
defaults: |
| 25 |
run: |
| 26 |
shell: bash |
| 27 |
|
| 28 |
jobs: |
| 29 |
quick_test: |
| 30 |
uses: ./.github/workflows/quick-test.yml |
| 31 |
test_and_pack_docker: |
| 32 |
uses: ./.github/workflows/test-and-pack-docker.yml |
| 33 |
delphi: |
| 34 |
uses: ./.github/workflows/delphi.yml |
| 35 |
test_and_pack_runner_native: |
| 36 |
uses: ./.github/workflows/test-and-pack-runner-native.yml |
| 37 |
test_shell: |
| 38 |
uses: ./.github/workflows/test-shell.yml |
| 39 |
check_dependencies: |
| 40 |
uses: ./.github/workflows/check-dependencies.yml |
| 41 |
api_reference: |
| 42 |
uses: ./.github/workflows/api-reference.yml |
| 43 |
|
| 44 |
release: |
| 45 |
name: Release |
| 46 |
needs: [quick_test, test_and_pack_docker, delphi, test_and_pack_runner_native, test_shell, check_dependencies, api_reference] |
| 47 |
if: ${{ github.ref == 'refs/heads/master' }} |
| 48 |
runs-on: ubuntu-latest |
| 49 |
steps: |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
- name: Download packaged releases |
| 63 |
uses: actions/download-artifact@v4 |
| 64 |
with: |
| 65 |
merge-multiple: true |
| 66 |
- name: List downloaded files |
| 67 |
run: ls -R |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
- name: GH CLI status |
| 74 |
env: |
| 75 |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 76 |
run: gh auth status |
| 77 |
- name: GH CLI test |
| 78 |
env: |
| 79 |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 80 |
run: gh release list --repo ${{ github.repository }} |
| 81 |
|
| 82 |
|
| 83 |
- name: Release Artifacts |
| 84 |
if: ${{ github.ref == 'refs/heads/master' }} |
| 85 |
run: gh release --repo ${{ github.repository }} upload ${{ env.release_tag }} --clobber castle-engine*.zip castle-engine-setup-*.exe |
| 86 |
env: |
| 87 |
GH_TOKEN: ${{ github.token }} |
| 88 |
|
| 89 |
update-release-tag: |
| 90 |
name: Update Release Tag (make release tag point to the build commit on master branch) |
| 91 |
runs-on: ubuntu-latest |
| 92 |
needs: [release] |
| 93 |
steps: |
| 94 |
- uses: actions/checkout@v4 |
| 95 |
- name: Update Release Tag |
| 96 |
if: ${{ github.ref == 'refs/heads/master' }} |
| 97 |
run: | |
| 98 |
# --force allows to overwrite previous tag |
| 99 |
git tag --force ${{ env.release_tag }} |
| 100 |
# --force allows to push with overwritten tag |
| 101 |
git push --force origin ${{ env.release_tag }} |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
- name: Dispatch updating Docker cge-unstable |
| 110 |
env: |
| 111 |
GH_TOKEN: ${{ secrets.GH_TOKEN_DISPATCH_DOCKER_UPDATE }} |
| 112 |
run: | |
| 113 |
gh api --method POST \ |
| 114 |
-H "Accept: application/vnd.github+json" \ |
| 115 |
-H "X-GitHub-Api-Version: 2022-11-28" \ |
| 116 |
/repos/castle-engine/castle-engine-docker/dispatches \ |
| 117 |
-f "event_type=cge-snapshot-changed" \ |
| 118 |
-F "client_payload[cge_commit_sha]=${{ github.sha }}" |