From 716e65eeae2daf616f018ec0bd1ca1d30522e7df Mon Sep 17 00:00:00 2001 From: Sheldan <5037282+Sheldan@users.noreply.github.com> Date: Mon, 19 Feb 2024 01:44:20 +0100 Subject: [PATCH] [OPB-xxx] adding creation of release to release job removing old release job --- .github/workflows/release.yml | 47 --------------------------- .github/workflows/release_manual.yaml | 6 ++++ 2 files changed, 6 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index bd2f09e..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/release_manual.yaml b/.github/workflows/release_manual.yaml index 5afa246..3b3141b 100644 --- a/.github/workflows/release_manual.yaml +++ b/.github/workflows/release_manual.yaml @@ -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: