Skip to content

Commit c5d3a10

Browse files
authored
Merge pull request #13 from Taknok/dev
Add autopublication
2 parents cbf9409 + da1e597 commit c5d3a10

File tree

6 files changed

+220
-860
lines changed

6 files changed

+220
-860
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ jobs:
1616
build:
1717
name: build
1818
runs-on: ubuntu-latest
19-
permissions:
20-
id-token: write
21-
attestations: write
2219
strategy:
2320
matrix:
2421
target_arch: [x86_64, x86, arm64-v8a, armeabi-v7a]
@@ -47,16 +44,51 @@ jobs:
4744
cmake -GNinja -Dprotobuf_BUILD_TESTS=OFF ..
4845
ninja -j$(nproc --all)
4946
popd
50-
env:
51-
NDK_TOOLCHAIN: ${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64
5247
5348
- name: Compiling aapt2
5449
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
55-
env:
56-
NDK_TOOLCHAIN: ${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64
5750

5851
- name: Upload artifacts
5952
uses: actions/upload-artifact@v4
6053
with:
6154
name: aapt2-${{ matrix.target_arch }}
62-
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)