Skip to content

Commit da1e597

Browse files
committed
CI create Release
1 parent f5bfe03 commit da1e597

File tree

6 files changed

+220
-862
lines changed

6 files changed

+220
-862
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ jobs:
1616
build:
1717
name: build
1818
runs-on: ubuntu-latest
19-
permissions:
20-
id-token: write
21-
contents: read
22-
attestations: write
2319
strategy:
2420
matrix:
2521
target_arch: [x86_64, x86, arm64-v8a, armeabi-v7a]
@@ -52,13 +48,47 @@ jobs:
5248
- name: Compiling aapt2
5349
run: python3 ./build.py --ndk=${{ steps.setup-ndk.outputs.ndk-path }} --abi=${{ matrix.target_arch }} --build="build/${{ matrix.target_arch }}" --protoc=/${{ github.workspace }}/src/protobuf/build/protoc --target aapt2
5450

55-
- name: Generating attestation of the generated aapt2
56-
uses: actions/attest-build-provenance@v2
57-
with:
58-
subject-path: ${{ github.workspace }}/build/${{ matrix.target_arch }}/bin/aapt2
59-
6051
- name: Upload artifacts
6152
uses: actions/upload-artifact@v4
6253
with:
6354
name: aapt2-${{ matrix.target_arch }}
64-
path: ${{ github.workspace }}/build/${{ matrix.target_arch }}/bin/aapt2
55+
path: ${{ github.workspace }}/build/${{ matrix.target_arch }}/bin/aapt2-*
56+
if-no-files-found: error
57+
58+
release:
59+
needs: build
60+
if: github.ref == 'refs/heads/main'
61+
runs-on: ubuntu-latest
62+
permissions:
63+
id-token: write
64+
contents: write
65+
pull-requests: write
66+
attestations: write
67+
steps:
68+
- name: Downloading artifact from all
69+
uses: actions/download-artifact@v4
70+
with:
71+
path: ./artifacts
72+
73+
- name: List
74+
run: |
75+
ls -la ./artifacts/
76+
77+
- name: Creating release
78+
uses: googleapis/release-please-action@v4
79+
if : ${{ hashFiles('artifacts/*') != '' }}
80+
id: release
81+
with:
82+
release-type: simple
83+
84+
- name: Generating attestation of the generated aapt2
85+
if: ${{ steps.release.outputs.release_created }}
86+
uses: actions/attest-build-provenance@v2
87+
with:
88+
subject-path: ./artifacts/aapt2-*/aapt2-*
89+
90+
- name: Uploading release artifact
91+
if: ${{ steps.release.outputs.release_created }}
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
run: gh release upload --repo ${{ github.repository }} ${{ steps.release.outputs.tag_name }} ./artifacts/aapt2-*/aapt2-*

CHANGELOG.md

Whitespace-only changes.

0 commit comments

Comments
 (0)