mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-04-07 02:00:43 +00:00
[OPB-xxx] adding manual release pipeline
updating abstracto version
This commit is contained in:
84
.github/workflows/release_manual.yaml
vendored
Normal file
84
.github/workflows/release_manual.yaml
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
name: Publishes a new version of OnePlusBot
|
||||||
|
on: workflow_dispatch
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: write
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: master
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'corretto'
|
||||||
|
java-version: 17
|
||||||
|
- name: Load current version
|
||||||
|
id: version
|
||||||
|
run: echo "version=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec | cut -d- -f1)" >> $GITHUB_ENV
|
||||||
|
- name: Release maven packages
|
||||||
|
uses: qcastel/github-actions-maven-release@v1.12.41
|
||||||
|
env:
|
||||||
|
JAVA_HOME: /usr/lib/jvm/java-17-openjdk/
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
abstractoUser: Sheldan
|
||||||
|
abstractoToken: ${{ secrets.ABSTRACTO_PAT }}
|
||||||
|
with:
|
||||||
|
git-release-bot-name: "release-bot"
|
||||||
|
git-release-bot-email: "release-bot@sheldan.dev"
|
||||||
|
release-branch-name: master
|
||||||
|
maven-args: "-Dmaven.javadoc.skip=true -s settings.xml -DskipTests"
|
||||||
|
access-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Login to Harbor
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: harbor.sheldan.dev
|
||||||
|
username: ${{ secrets.HARBOR_USERNAME }}
|
||||||
|
password: ${{ secrets.HARBOR_TOKEN }}
|
||||||
|
- name: Update Chart version file
|
||||||
|
uses: fjogeleit/yaml-update-action@v0.13.2
|
||||||
|
with:
|
||||||
|
valueFile: 'deployment/helm/oneplus-bot/Chart.yaml'
|
||||||
|
propertyPath: 'version'
|
||||||
|
value: ${{ env.version }}
|
||||||
|
commitChange: false
|
||||||
|
- name: Update value files version
|
||||||
|
uses: fjogeleit/yaml-update-action@v0.13.2
|
||||||
|
with:
|
||||||
|
valueFile: 'deployment/helm/oneplus-bot/values.yaml'
|
||||||
|
commitChange: false
|
||||||
|
changes: |
|
||||||
|
{
|
||||||
|
"bot.tag": "${{ env.version }}",
|
||||||
|
"templateDeploymentData.tag": "${{ env.version }}",
|
||||||
|
"dbConfigDeploymentData.tag": "${{ env.version }}"
|
||||||
|
}
|
||||||
|
- name: Update .env version
|
||||||
|
run:
|
||||||
|
sed -i '3s/.*/VERSION=${{ env.version }}/' .env
|
||||||
|
- name: Load env file
|
||||||
|
id: dotenv
|
||||||
|
uses: falti/dotenv-action@v1.0.4
|
||||||
|
with:
|
||||||
|
path: .env
|
||||||
|
- name: Build and push Docker containers
|
||||||
|
run: docker-compose build && docker-compose push
|
||||||
|
env:
|
||||||
|
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
|
||||||
|
VERSION: ${{ steps.dotenv.outputs.version }}
|
||||||
|
- name: Helm package and push
|
||||||
|
working-directory: ./deployment/helm/
|
||||||
|
run: |-
|
||||||
|
helm registry login -u '${{ secrets.HARBOR_USERNAME }}' -p '${{ secrets.HARBOR_TOKEN }}' harbor.sheldan.dev
|
||||||
|
helm package oneplus-bot
|
||||||
|
helm push oneplus-bot*.tgz oci://harbor.sheldan.dev/oneplus-bot
|
||||||
|
- name: Fix file permissions
|
||||||
|
run:
|
||||||
|
sudo chmod -R ugo+rwX . # https://github.com/actions/checkout/issues/164
|
||||||
|
- name: Commit updated versions
|
||||||
|
uses: EndBug/add-and-commit@v9
|
||||||
|
with:
|
||||||
|
author_name: "release-bot"
|
||||||
|
author_email: "release-bot@sheldan.dev"
|
||||||
23
pom.xml
23
pom.xml
@@ -17,8 +17,8 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<abstracto.version>1.5.21</abstracto.version>
|
<abstracto.version>1.5.23</abstracto.version>
|
||||||
<abstracto.templates.version>1.4.29</abstracto.templates.version>
|
<abstracto.templates.version>1.4.31</abstracto.templates.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
@@ -34,8 +34,15 @@
|
|||||||
<url>https://jcenter.bintray.com</url>
|
<url>https://jcenter.bintray.com</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>github</id>
|
<id>github-abstracto</id>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/*</url>
|
<url>https://maven.pkg.github.com/Sheldan/abstracto*</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>github-oneplusbot</id>
|
||||||
|
<url>https://maven.pkg.github.com/Sheldan/OnePlusBot*</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
@@ -45,16 +52,16 @@
|
|||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>github</id>
|
<id>github-oneplusbot</id>
|
||||||
<name>GitHub Packages</name>
|
<name>GitHub Packages</name>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/OnePlusBot</url>
|
<url>https://maven.pkg.github.com/Sheldan/OnePlusBot</url>
|
||||||
</repository>
|
</repository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/OnePlusBot</url>
|
<connection>scm:git:${project.scm.url}</connection>
|
||||||
<developerConnection>scm:git:git@github.com:Sheldan/OnePlusBot.git</developerConnection>
|
<developerConnection>scm:git:${project.scm.url}</developerConnection>
|
||||||
|
<url>https://github.com/Sheldan/OnePlusBot.git</url>
|
||||||
<tag>HEAD</tag>
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
28
settings.xml
28
settings.xml
@@ -16,8 +16,15 @@
|
|||||||
<url>https://repo1.maven.org/maven2</url>
|
<url>https://repo1.maven.org/maven2</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>github</id>
|
<id>github-abstracto</id>
|
||||||
<url>https://maven.pkg.github.com/Sheldan/*</url>
|
<url>https://maven.pkg.github.com/Sheldan/abstracto*</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>github-oneplusbot</id>
|
||||||
|
<url>https://maven.pkg.github.com/Sheldan/OnePlusBot*</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
@@ -28,9 +35,20 @@
|
|||||||
|
|
||||||
<servers>
|
<servers>
|
||||||
<server>
|
<server>
|
||||||
<id>github</id>
|
<id>github-abstracto</id>
|
||||||
<username>${env.user}</username>
|
<username>${env.abstractoUser}</username>
|
||||||
<password>${env.token}</password>
|
<password>${env.abstractoToken}</password>
|
||||||
|
</server>
|
||||||
|
<server>
|
||||||
|
<id>github-oneplusbot</id>
|
||||||
|
<configuration>
|
||||||
|
<httpHeaders>
|
||||||
|
<property>
|
||||||
|
<name>Authorization</name>
|
||||||
|
<value>Bearer ${env.GITHUB_TOKEN}</value>
|
||||||
|
</property>
|
||||||
|
</httpHeaders>
|
||||||
|
</configuration>
|
||||||
</server>
|
</server>
|
||||||
</servers>
|
</servers>
|
||||||
</settings>
|
</settings>
|
||||||
|
|||||||
Reference in New Issue
Block a user