mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-01-01 15:28:28 +00:00
[OPB-xxx] adding creation of release to release job
removing old release job
This commit is contained in:
47
.github/workflows/release.yml
vendored
47
.github/workflows/release.yml
vendored
@@ -1,47 +0,0 @@
|
||||
name: Publish package to GitHub Packages
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Java for publishing to GitHub Packages
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'corretto'
|
||||
java-version: 17
|
||||
- name: Load current version
|
||||
id: version
|
||||
run: echo "version=$(mvn -s settings.xml --file pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
|
||||
- name: Publish to GitHub Packages
|
||||
run: mvn -s settings.xml --file pom.xml -B deploy -Dmaven.wagon.http.pool=false -DskipTests=true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
user: Sheldan
|
||||
token: ${{ secrets.ABSTRACTO_PAT }}
|
||||
- name: Login to Harbor
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: harbor.sheldan.dev
|
||||
username: ${{ secrets.HARBOR_USERNAME }}
|
||||
password: ${{ secrets.HARBOR_TOKEN }}
|
||||
- name: Load env files
|
||||
id: dotenv
|
||||
uses: falti/dotenv-action@v1.0.4
|
||||
with:
|
||||
path: .env
|
||||
- name: Push container
|
||||
run: docker-compose build && docker-compose push
|
||||
env:
|
||||
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
|
||||
VERSION: ${{ steps.dotenv.outputs.version }}
|
||||
- name: Helm 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
|
||||
6
.github/workflows/release_manual.yaml
vendored
6
.github/workflows/release_manual.yaml
vendored
@@ -18,6 +18,12 @@ jobs:
|
||||
- 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: Create a Release
|
||||
uses: elgohr/Github-Release-Action@v5
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
title: Release of version ${{ env.version }}
|
||||
- name: Release maven packages
|
||||
uses: qcastel/github-actions-maven-release@v1.12.41
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user