Skip to content

Commit

Permalink
Revert "为快照启用 cloudflare s3 部署"
Browse files Browse the repository at this point in the history
This reverts commit 9b2be16.
  • Loading branch information
Ghost-chu committed Dec 5, 2024
1 parent f9da8d4 commit 741e1c6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 103 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/delete_old_s3_objects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 2,6 @@ name: Empty S3 directory

on:
workflow_call:
inputs:
path_to_delete:
description: 'The path will be deleted'
required: true
type: string
secrets:
S3_ACCESS_KEY:
required: true
Expand All @@ -30,4 25,4 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
AWS_S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
PATH_TO_DELETE: ${{ inputs.path_to_delete }}
PATH_TO_DELETE: updates/latest
23 changes: 0 additions & 23 deletions .github/workflows/jvm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 30,6 @@ jobs:
Build_PKG:
needs: CI
uses: ./.github/workflows/build_pkg.yml
Empty_Old_S3_Files:
needs: [ Build_Executable, Build_Installers ]
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
uses: ./.github/workflows/delete_old_s3_objects.yml
secrets: inherit
with:
path_to_delete: 'updates/snapshot'
Upload_Updates_To_S3:
needs: [ Build_Executable, Build_Installers, Empty_Old_S3_Files ]
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: installer-dist
path: target/media
- uses: ./.github/workflows/upload_to_cloudflare_s3.yml
with:
destination_dir: 'updates/snapshot'
Clear_CloudFlare_Updates:
needs: [ Upload_Updates_To_S3 ]
uses: ./.github/workflows/flush_cloudflare_cache.yml
secrets: inherit
Build_Docker:
needs: CI
runs-on: ubuntu-latest
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/jvm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 45,24 @@ jobs:
needs: Build_Executable
uses: ./.github/workflows/build_portable.yml
Empty_Old_S3_Files:
needs: [ Build_Executable, Build_Installers ]
needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG, Build_Portable]
uses: ./.github/workflows/delete_old_s3_objects.yml
secrets: inherit
with:
path_to_delete: 'updates/latest'
Upload_Updates_To_S3:
needs: [ Build_Executable, Build_Installers, Empty_Old_S3_Files ]
needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG, Build_Portable, Empty_Old_S3_Files]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: installer-dist
path: target/media
- uses: ./.github/workflows/upload_to_cloudflare_s3.yml
- uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.S3_ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.S3_SECRET_KEY }}
aws_bucket: ${{ secrets.S3_BUCKET }}
endpoint: ${{ secrets.S3_ENDPOINT }}
source_dir: 'target/media'
destination_dir: 'updates/latest'
Clear_CloudFlare_Updates:
needs: [Upload_Updates_To_S3]
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/upload_to_cloudflare_s3.yml

This file was deleted.

4 changes: 1 addition & 3 deletions install4j/project.install4j
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 12,6 @@
<variable name="registerSystemService" value="registerSystemService" />
<variable name="jarPath" value="../target/PeerBanHelper.jar" />
<variable name="librariesPath" value="../target/libraries" />
<variable name="updatesXmlUrl" value="https://pbh-files.pbh-btn.com/updates/snapshot/updates.xml" />
<variable name="updatesInstallerBaseUrl" value="https://pbh-files.pbh-btn.com/snapshot/latest" />
</variables>
<jreBundles jdkProviderId="Liberica" release="23/23.0.1 13" />
</application>
Expand Down Expand Up @@ -106,7 104,7 @@
</iconImageFiles>
</launcher>
</launchers>
<installerGui autoUpdateDescriptorUrl="${compiler:updatesXmlUrl}" autoUpdateBaseUrl="${compiler:updatesInstallerBaseUrl}">
<installerGui autoUpdateDescriptorUrl="https://pbh-files.pbh-btn.com/updates/latest/updates.xml">
<applications>
<application id="installer" beanClass="com.install4j.runtime.beans.applications.InstallerApplication">
<startup>
Expand Down
35 changes: 1 addition & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 6,7 @@

<groupId>com.ghostchu.peerbanhelper</groupId>
<artifactId>peerbanhelper</artifactId>
<version>7.2.0-SNAPSHOT-24w49a</version>
<version>7.2.0-Alpha1</version>
<packaging>jar</packaging>

<name>PeerBanHelper</name>
Expand Down Expand Up @@ -180,39 180,6 @@
<variables>
<librariesPath>${project.basedir}/target/libraries</librariesPath>
<jarPath>${project.basedir}/target/PeerBanHelper.jar</jarPath>
<updatesXmlUrl>https://pbh-files.pbh-btn.com/updates/snapshot/updates.xml</updatesXmlUrl>
<!-- <updatesInstallerBaseUrl>https://pbh-files.pbh-btn.com/snapshot/latest</updatesInstallerBaseUrl>-->
</variables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>install4j-release</id>
<build>
<plugins>
<plugin>
<groupId>com.install4j</groupId>
<artifactId>install4j-maven</artifactId>
<version>11.0.1</version>
<executions>
<execution>
<id>compile-installers</id>
<phase>package</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<installDir>${install4j.home}</installDir>
<projectFile>${project.basedir}/install4j/project.install4j</projectFile>
<variables>
<librariesPath>${project.basedir}/target/libraries</librariesPath>
<jarPath>${project.basedir}/target/PeerBanHelper.jar</jarPath>
<updatesXmlUrl>https://pbh-files.pbh-btn.com/updates/latest/updates.xml</updatesXmlUrl>
<!-- <updatesInstallerBaseUrl>https://pbh-files.pbh-btn.com/updates/latest/updates.xml</updatesInstallerBaseUrl>-->
</variables>
</configuration>
</execution>
Expand Down

0 comments on commit 741e1c6

Please sign in to comment.