Skip to content

Commit 6ed77fa

Browse files
committed
sha gpg svn
1 parent 5bef1bf commit 6ed77fa

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/automate.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Test Automate Workflow
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
gpg-test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
# Create a test file
11+
- name: Create Test File
12+
run: echo "This is a test file for GPG signing" > test-file.txt
13+
14+
# Create a SHA-512 checksum file
15+
- name: Create SHA-512 Checksum File
16+
run: |
17+
name="test-file.txt"
18+
shasum -a 512 "${name}" > "${name}.sha512"
19+
20+
# Verify the SHA-512 checksum
21+
- name: Verify the SHA-512 Checksum
22+
run: |
23+
name="test-file.txt"
24+
shasum -a 512 --check "${name}.sha512"
25+
26+
# Import GPG key using crazy-max/ghaction-import-gpg
27+
- name: Import GPG Key
28+
id: import_gpg
29+
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549
30+
with:
31+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
32+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
33+
34+
# Sign the file using the provided GPG command
35+
- name: Detach Sign the File
36+
run: |
37+
name="test-file.txt"
38+
gpg --yes --armor --output "${name}.asc" --detach-sig "${name}"
39+
40+
# Verify the detached signature
41+
- name: Verify the Detached Signature
42+
run: |
43+
name="test-file.txt"
44+
gpg --verify "${name}.asc" "${name}"
45+
46+
# Run SVN Steps
47+
- name: Perform SVN Operations
48+
env:
49+
RC: rc1
50+
VERSION: 0.7.0rc1
51+
VERSION_WITHOUT_RC: 0.7.0
52+
VERSION_BRANCH: 0-7-0
53+
run: |
54+
export RC=rc1
55+
export VERSION=0.7.0${RC}
56+
export VERSION_WITHOUT_RC=${VERSION/rc?/}
57+
export VERSION_BRANCH=${VERSION_WITHOUT_RC//./-}
58+
59+
echo "RC: $RC"
60+
echo "VERSION: $VERSION"
61+
echo "VERSION_WITHOUT_RC: $VERSION_WITHOUT_RC"
62+
echo "VERSION_BRANCH: $VERSION_BRANCH"
63+
64+
export SVN_TMP_DIR=/tmp/iceberg-${VERSION_BRANCH}/
65+
svn checkout https://dist.apache.org/repos/dist/dev/iceberg $SVN_TMP_DIR
66+
67+
# export SVN_TMP_DIR_VERSIONED=${SVN_TMP_DIR}pyiceberg-$VERSION/
68+
# mkdir -p $SVN_TMP_DIR_VERSIONED
69+
# cp * $SVN_TMP_DIR_VERSIONED
70+
# svn add $SVN_TMP_DIR_VERSIONED
71+
# svn ci -m "PyIceberg ${VERSION}" ${SVN_TMP_DIR_VERSIONED}

0 commit comments

Comments
 (0)