Compare commits
9 Commits
i2p-mac-2.
...
master
Author | SHA1 | Date | |
---|---|---|---|
61e646ba3b | |||
a5dadeb6a6 | |||
0b21094016 | |||
9bef7b35f5 | |||
48348eb63d | |||
bb6b93a556 | |||
72de4bc4df | |||
f6026af5ba | |||
cb450487f8 |
24
.github/workflows/ant.yml
vendored
24
.github/workflows/ant.yml
vendored
@ -9,6 +9,8 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
@ -20,6 +22,26 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: I2P-${{ github.sha }}.dmg
|
||||
path: I2P-1.0.dmg
|
||||
path: I2P-*.dmg
|
||||
|
||||
build-22:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 22
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '22'
|
||||
distribution: 'temurin'
|
||||
- name: build with script
|
||||
run: ./build.sh
|
||||
- name: Upload I2P-${{ github.sha }}.dmg
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: I2P-${{ github.sha }}-22.dmg
|
||||
path: I2P-*.dmg
|
||||
|
||||
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -54,13 +54,13 @@ jobs:
|
||||
sleep 1m
|
||||
- name: Download artifacts
|
||||
id: download-artifact
|
||||
uses: dawidd6/action-download-artifact@v3
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
with:
|
||||
skip_unpack: true
|
||||
workflow: ant.yml
|
||||
if_no_artifact_found: fail
|
||||
# remove .zip file extension
|
||||
- run: for f in *.zip; do unzip "$f"; rm "$f"; done
|
||||
- run: for f in *.zip; do unzip -o "$f"; rm "$f"; done
|
||||
- run: echo "" | tee -a docs/RELEASE.md
|
||||
- run: echo "## Checksums" | tee -a docs/RELEASE.md
|
||||
- run: echo "" | tee -a docs/RELEASE.md
|
||||
|
66
.github/workflows/sync.yaml
vendored
Normal file
66
.github/workflows/sync.yaml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# GitHub Actions workflow file to sync an external repository to this GitHub mirror.
|
||||
# This file was automatically generated by go-github-sync.
|
||||
#
|
||||
# The workflow does the following:
|
||||
# - Runs on a scheduled basis (and can also be triggered manually)
|
||||
# - Clones the GitHub mirror repository
|
||||
# - Fetches changes from the primary external repository
|
||||
# - Applies those changes to the mirror repository
|
||||
# - Pushes the updated content back to the GitHub mirror
|
||||
#
|
||||
# Authentication is handled by the GITHUB_TOKEN secret provided by GitHub Actions.
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Validate Github Actions Environment
|
||||
run: if [ "$GITHUB_ACTIONS" != "true" ]; then echo 'This script must be run in a GitHub Actions environment.'; exit 1; fi
|
||||
- name: Checkout GitHub Mirror
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Configure Git
|
||||
run: |-
|
||||
git config user.name 'GitHub Actions'
|
||||
git config user.email 'actions@github.com'
|
||||
- env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: Sync Primary Repository
|
||||
run: |-
|
||||
# Add the primary repository as a remote
|
||||
git remote add primary https://i2pgit.org/I2P_Developers/i2p-jpackage-mac.git
|
||||
|
||||
# Fetch the latest changes from the primary repository
|
||||
git fetch primary
|
||||
|
||||
# Check if the primary branch exists in the primary repository
|
||||
if git ls-remote --heads primary master | grep -q master; then
|
||||
echo "Primary branch master found in primary repository"
|
||||
else
|
||||
echo "Error: Primary branch master not found in primary repository"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if we're already on the mirror branch
|
||||
if git rev-parse --verify --quiet master; then
|
||||
git checkout master
|
||||
else
|
||||
# Create the mirror branch if it doesn't exist
|
||||
git checkout -b master
|
||||
fi
|
||||
|
||||
|
||||
# Force-apply all changes from primary, overriding any conflicts
|
||||
echo "Performing force sync from primary/master to master"
|
||||
git reset --hard primary/master
|
||||
|
||||
|
||||
# Push changes back to the mirror repository
|
||||
git push origin master
|
||||
name: Sync Primary Repository to GitHub Mirror
|
||||
"on":
|
||||
push: {}
|
||||
schedule:
|
||||
- cron: 0 * * * *
|
||||
workflow_dispatch: {}
|
14
build.sh
14
build.sh
@ -3,6 +3,16 @@ set -e
|
||||
git describe --tags `git rev-list --tags --max-count=1` || exit 1
|
||||
export GITHUB_TAG=$(git describe --tags `git rev-list --tags --max-count=1` | sed 's|i2p||g' | tr -d a-z-)
|
||||
|
||||
if echo "$GITHUB_TAG" | grep -q '.\..\..'; then
|
||||
PUBLISH_VERSION="$GITHUB_TAG"
|
||||
else
|
||||
echo "github tag $GITHUB_TAG does not match version pattern"
|
||||
# no way to guess here, so if it's unset it must default to the latest version number:
|
||||
if [ -z "$PUBLISH_VERSION" ]; then
|
||||
PUBLISH_VERSION="2.7.0"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$I2P_VERSION" ]; then
|
||||
I2P_VERSION="i2p-$GITHUB_TAG"
|
||||
fi
|
||||
@ -17,6 +27,8 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "using $PUBLISH_VERSION as our release version to placate jpackage"
|
||||
|
||||
if [ -z "$I2P_BUILD_NUMBER" ]; then
|
||||
I2P_BUILD_NUMBER=1
|
||||
fi
|
||||
@ -152,7 +164,7 @@ fi
|
||||
# consider there might be some reason to re-enable this if an external maintainer arrives
|
||||
#cp "$HERE"/resources/*.crt I2P.app/Contents/Resources/certificates/router
|
||||
|
||||
jpackage --name I2P \
|
||||
jpackage --name I2P --app-version "$PUBLISH_VERSION" \
|
||||
--java-options "-Xmx512m" \
|
||||
--java-options "--add-opens java.base/java.lang=ALL-UNNAMED" \
|
||||
--java-options "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" \
|
||||
|
@ -9,9 +9,9 @@
|
||||
|
||||
|
||||
# Uncomment/Edit this line to include the version number in the config file
|
||||
I2P_VERSION=i2p-2.4.0
|
||||
I2P_VERSION=i2p-2.7.0
|
||||
# Uncomment/Edit this line to change the version number that you pass to jpackage
|
||||
I2P_RELEASE_VERSION=2.4.0
|
||||
I2P_RELEASE_VERSION=2.7.0
|
||||
# Uncomment/Edit this line to include the build number in the config file
|
||||
# I2P_BUILD_NUMBER=1
|
||||
|
||||
|
Reference in New Issue
Block a user