Skip to content

Commit cd73130

Browse files
committed
merge master into pr
2 parents 5ed5a94 + c34106e commit cd73130

58 files changed

Lines changed: 3785 additions & 4100 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.asf-release/.gitkeep

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# ---
19+
# This directory is used as apart of the release process.
20+
# Package tarballs will be generated in stored temporarily
21+
# within this directory and should not be commited to repo.
22+
# ---

.asf.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# to you under the Apache License, Version 2.0 (the
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
* text eol=lf
219

320
# source code

.github/workflows/android.yml

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
9+
# http://www.apache.org/licenses/LICENSE-2.0
1010
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
# KIND, either express or implied. See the License for the
14+
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

@@ -30,6 +30,9 @@ on:
3030
- 'LICENSE'
3131
- '.eslint*'
3232

33+
permissions:
34+
contents: read
35+
3336
jobs:
3437
test:
3538
name: Android ${{ matrix.versions.android }} Test
@@ -41,7 +44,7 @@ jobs:
4144
# Storing a copy of the repo
4245
repo: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
4346

44-
node-version: 20
47+
node-version: 24
4548

4649
# These are the default Java configurations used by most tests.
4750
# To customize these options, add "java-distro" or "java-version" to the strategy matrix with its overriding value.
@@ -57,28 +60,6 @@ jobs:
5760
strategy:
5861
matrix:
5962
versions:
60-
- android: 7
61-
android-api: 24
62-
63-
- android: 7.1
64-
android-api: 25
65-
66-
- android: 8
67-
android-api: 26
68-
69-
- android: 8.1
70-
android-api: 27
71-
system-image-arch: x86
72-
73-
- android: 9
74-
android-api: 28
75-
76-
- android: 10
77-
android-api: 29
78-
79-
- android: 11
80-
android-api: 30
81-
8263
- android: 12
8364
android-api: 31
8465

@@ -91,14 +72,20 @@ jobs:
9172
- android: 14
9273
android-api: 34
9374

75+
- android: 15
76+
android-api: 35
77+
78+
- android: 16
79+
android-api: 36
80+
9481
timeout-minutes: 60
9582

9683
steps:
97-
- uses: actions/checkout@v4
98-
- uses: actions/setup-node@v4
84+
- uses: actions/checkout@v6
85+
- uses: actions/setup-node@v6
9986
with:
10087
node-version: ${{ env.node-version }}
101-
- uses: actions/setup-java@v4
88+
- uses: actions/setup-java@v5
10289
env:
10390
java-version: ${{ matrix.versions.java-version == '' && env.default_java-version || matrix.versions.java-version }}
10491
java-distro: ${{ matrix.versions.java-distro == '' && env.default_java-distro || matrix.versions.java-distro }}
@@ -129,7 +116,7 @@ jobs:
129116
if: ${{ endswith(env.repo, '/cordova-paramedic') != true }}
130117
run: npm i -g github:apache/cordova-paramedic
131118

132-
- uses: reactivecircus/android-emulator-runner@v2
119+
- uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b
133120
env:
134121
system-image-arch: ${{ matrix.versions.system-image-arch == '' && env.default_system-image-arch || matrix.versions.system-image-arch }}
135122
system-image-target: ${{ matrix.versions.system-image-target == '' && env.default_system-image-target || matrix.versions.system-image-target }}
@@ -143,7 +130,7 @@ jobs:
143130
script: echo "Pregenerate the AVD before running Paramedic"
144131

145132
- name: Run paramedic tests
146-
uses: reactivecircus/android-emulator-runner@v2
133+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b
147134
env:
148135
system-image-arch: ${{ matrix.versions.system-image-arch == '' && env.default_system-image-arch || matrix.versions.system-image-arch }}
149136
system-image-target: ${{ matrix.versions.system-image-target == '' && env.default_system-image-target || matrix.versions.system-image-target }}

.github/workflows/chrome.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
9+
# http://www.apache.org/licenses/LICENSE-2.0
1010
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
# KIND, either express or implied. See the License for the
14+
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

@@ -29,6 +29,9 @@ on:
2929
- 'LICENSE'
3030
- '.eslint*'
3131

32+
permissions:
33+
contents: read
34+
3235
jobs:
3336
test:
3437
name: Chrome Latest Test
@@ -39,11 +42,11 @@ jobs:
3942
# Storing a copy of the repo
4043
repo: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
4144

42-
node-version: 20
45+
node-version: 24
4346

4447
steps:
45-
- uses: actions/checkout@v4
46-
- uses: actions/setup-node@v4
48+
- uses: actions/checkout@v6
49+
- uses: actions/setup-node@v6
4750
with:
4851
node-version: ${{ env.node-version }}
4952

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Draft Release
19+
20+
on:
21+
push:
22+
tags:
23+
- 'draft/**'
24+
25+
permissions:
26+
contents: read
27+
id-token: write
28+
29+
jobs:
30+
upload-to-atr:
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v6
35+
- uses: actions/setup-node@v6
36+
with:
37+
node-version: 24
38+
39+
- name: Setup environment variables
40+
run: |
41+
REPO_NAME="${GITHUB_REPOSITORY#*/}"
42+
TAG_NAME="${GITHUB_REF#refs/tags/}"
43+
TARGET_RELEASE_VERSION="${TAG_NAME#draft/}"
44+
SRC_PACKAGE_NAME=${REPO_NAME}-source-${TARGET_RELEASE_VERSION}
45+
SRC_PACKAGE_TAR=${SRC_PACKAGE_NAME}.tar
46+
SRC_PACKAGE_TAR_GZ=${SRC_PACKAGE_NAME}.tar.gz
47+
SRC_PACKAGE_ZIP=${SRC_PACKAGE_NAME}.zip
48+
NPM_PACKAGE_NAME=${REPO_NAME}-npm-${TARGET_RELEASE_VERSION}
49+
50+
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
51+
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
52+
echo "TARGET_RELEASE_VERSION=$TARGET_RELEASE_VERSION" >> $GITHUB_ENV
53+
echo "SRC_PACKAGE_NAME=$SRC_PACKAGE_NAME" >> $GITHUB_ENV
54+
echo "SRC_PACKAGE_TAR=$SRC_PACKAGE_TAR" >> $GITHUB_ENV
55+
echo "SRC_PACKAGE_TAR_GZ=$SRC_PACKAGE_TAR_GZ" >> $GITHUB_ENV
56+
echo "SRC_PACKAGE_ZIP=$SRC_PACKAGE_ZIP" >> $GITHUB_ENV
57+
echo "NPM_PACKAGE_NAME=$NPM_PACKAGE_NAME" >> $GITHUB_ENV
58+
59+
echo "REPO_NAME=$REPO_NAME"
60+
echo "TAG_NAME=$TAG_NAME"
61+
echo "TARGET_RELEASE_VERSION=$TARGET_RELEASE_VERSION"
62+
echo "SRC_PACKAGE_NAME=$SRC_PACKAGE_NAME"
63+
echo "SRC_PACKAGE_TAR=$SRC_PACKAGE_TAR"
64+
echo "SRC_PACKAGE_TAR_GZ=$SRC_PACKAGE_TAR_GZ"
65+
echo "SRC_PACKAGE_ZIP=$SRC_PACKAGE_ZIP"
66+
echo "NPM_PACKAGE_NAME=$NPM_PACKAGE_NAME"
67+
68+
- name: Verify Target Release Version
69+
run: |
70+
PACKAGE_VERSION=$(jq -r '.version' package.json)
71+
if [ $PACKAGE_VERSION != "$TARGET_RELEASE_VERSION" ]; then
72+
echo "Mismatch version detected between tag version ($TARGET_RELEASE_VERSION) and package version ($PACKAGE_VERSION)"
73+
exit 1
74+
fi
75+
76+
if [ -f "plugin.xml" ]; then
77+
PLUGIN_VERSION=$(yq -p=xml -o=json '.plugin.+@version' plugin.xml)
78+
if [ $PLUGIN_VERSION != "$TARGET_RELEASE_VERSION" ]; then
79+
echo "Mismatch version detected between tag version ($TARGET_RELEASE_VERSION) and plugin version ($PLUGIN_VERSION)"
80+
exit 1
81+
fi
82+
fi
83+
84+
- name: Generate "tgz" npm convenience package
85+
run: |-
86+
npm install
87+
NPM_PKG_NAME=$(npm pack --json | jq -r '.[0].filename')
88+
mv ./.asf-release/$NPM_PKG_NAME ./.asf-release/${NPM_PACKAGE_NAME}.tgz
89+
env:
90+
TZ: UTC
91+
92+
- name: Generate "tar" source package
93+
run: |-
94+
export SRC_LAST_COMMIT_EPOCH=$(git log -1 --format=%ct "$TAG_NAME")
95+
96+
git archive \
97+
--prefix=$SRC_PACKAGE_NAME/ \
98+
--mtime=$SRC_LAST_COMMIT_EPOCH \
99+
-o ./.asf-release/${SRC_PACKAGE_TAR} \
100+
$TAG_NAME
101+
env:
102+
TZ: UTC
103+
104+
- name: Generate "tar.gz" source archive
105+
working-directory: ./.asf-release
106+
run: |-
107+
gzip -n -9 -c "$SRC_PACKAGE_TAR" > "$SRC_PACKAGE_TAR_GZ"
108+
env:
109+
TZ: UTC
110+
111+
- name: Generate "zip" source archive
112+
working-directory: ./.asf-release
113+
run: |-
114+
export ASF_RELEASE_DIR=$(pwd)
115+
export TMP_DIR=$(mktemp -d)
116+
117+
tar -xf "$SRC_PACKAGE_TAR" -C "$TMP_DIR"
118+
(
119+
cd "$TMP_DIR"
120+
find . -type f | LC_ALL=C sort | zip -X -q "$ASF_RELEASE_DIR/$SRC_PACKAGE_ZIP" -@
121+
)
122+
rm -rf $TMP_DIR
123+
env:
124+
TZ: UTC
125+
126+
- name: Cleanup Process
127+
working-directory: ./.asf-release
128+
run: |-
129+
rm -rf $SRC_PACKAGE_TAR
130+
rm -rf .gitkeep
131+
132+
- name: Create Sign and Checksum
133+
working-directory: .asf-release
134+
run: |-
135+
for f in *.tar.gz *.tgz *.zip; do
136+
[ -e "$f" ] || continue
137+
echo "$CORDOVA_GPG_SECRET_KEY" | gpg --batch --import --import-options import-show
138+
gpg --armor --detach-sign "$f"
139+
sha512sum "$f" > "${f}.sha512"
140+
done
141+
env:
142+
CORDOVA_GPG_SECRET_KEY: ${{ secrets.CORDOVA_GPG_SECRET_KEY }}
143+
144+
- name: Upload to Apache Trusted Release (ATR)
145+
uses: apache/tooling-actions/upload-to-atr@b7e972c11790ee16eca101900af1b3c7fd1b106e
146+
with:
147+
project: ${{ env.REPO_NAME }}
148+
version: ${{ env.TARGET_RELEASE_VERSION }}
149+
src: .asf-release

0 commit comments

Comments
 (0)