Skip to content

Commit

Permalink
Update nexus-development.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejMDDV authored Oct 23, 2023
1 parent 6e75106 commit 32197ac
Showing 1 changed file with 47 additions and 5 deletions.
52 changes: 47 additions & 5 deletions .github/workflows/nexus-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- develop
- CP-*
- nexus-internal
jobs:
build:
runs-on: macOS
Expand Down Expand Up @@ -48,15 +49,19 @@ jobs:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |
export APP_VERSION=`echo -n v && cat packages/app/package.json | jq -r .version`
export APP_VERSION=`cat packages/app/package.json | jq -r .version`
export SOURCE_BRANCH=${{ github.ref_name }}
export "BUILD_VERSION=-dev.${{ github.run_number }}"
if [[ $SOURCE_BRANCH == "develop" ]]; then
if [[ $SOURCE_BRANCH == "develop" ]] || [[ $SOURCE_BRANCH == "nexus" ]]; then
export ENVIVORMENT_CATALOG_NAME=development
export "BUILD_VERSION=-dev.${{ github.run_number }}"
else
export "ENVIVORMENT_CATALOG_NAME=feature-branch/${{ github.ref_name }}"
export "BUILD_VERSION=.${{ github.run_number }}"
fi
export APP_VERSION=`echo -n v && cat packages/app/package.json | jq -r .version`
echo "GITTAG=$APP_VERSION$BUILD_VERSION" >> $GITHUB_ENV
export GITTAG="$APP_VERSION$BUILD_VERSION"
git tag "$GITTAG"
git push origin "$GITTAG"
curl -v -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./packages/app/release/Mudita-Center.exe https://nexus.mudita.com/repository/mudita-center/releases/$ENVIVORMENT_CATALOG_NAME/$APP_VERSION$BUILD_VERSION/Mudita-Center.exe
curl -v -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./packages/app/release/Mudita-Center.AppImage https://nexus.mudita.com/repository/mudita-center/releases/$ENVIVORMENT_CATALOG_NAME/$APP_VERSION$BUILD_VERSION/Mudita-Center.AppImage
curl -v -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./packages/app/release/Mudita-Center.dmg https://nexus.mudita.com/repository/mudita-center/releases/$ENVIVORMENT_CATALOG_NAME/$APP_VERSION$BUILD_VERSION/Mudita-Center.dmg
Expand All @@ -68,4 +73,41 @@ jobs:
curl -v -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./packages/app/release/latest-mac.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIVORMENT_CATALOG_NAME/$APP_VERSION$BUILD_VERSION/latest-mac.yml
curl -v -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./packages/app/release/latest.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIVORMENT_CATALOG_NAME/$APP_VERSION$BUILD_VERSION/latest.yml
curl -v -u $NEXUS_USERNAME:$NEXUS_PASSWORD --upload-file ./packages/app/release/builder-debug.yml https://nexus.mudita.com/repository/mudita-center/releases/$ENVIVORMENT_CATALOG_NAME/$APP_VERSION$BUILD_VERSION/builder-debug.yml
- name: Create draft release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
./packages/app/release/Mudita-Center.exe
./packages/app/release/Mudita-Center.AppImage
./packages/app/release/Mudita-Center.dmg
./packages/app/release/Mudita-Center.zip
./packages/app/release/Mudita-Center.zip.blockmap
./packages/app/release/Mudita-Center.exe.blockmap
./packages/app/release/Mudita-Center.dmg.blockmap
./packages/app/release/latest-linux.yml
./packages/app/release/latest-mac.yml
./packages/app/release/latest.yml
./packages/app/release/builder-debug.yml
tag_name: ${{ env.GITTAG }}
name: Mudita Center v${{ env.GITTAG }}
repo: mudita/mudita-center-internal-releases
token: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }}
draft: true
- name: Push artifacts to github
id: upload_assets
uses: actions/upload-artifact@v2
with:
name: release-assets
path: |
./packages/app/release/Mudita-Center.exe
./packages/app/release/Mudita-Center.AppImage
./packages/app/release/Mudita-Center.dmg
./packages/app/release/Mudita-Center.zip
./packages/app/release/Mudita-Center.zip.blockmap
./packages/app/release/Mudita-Center.exe.blockmap
./packages/app/release/Mudita-Center.dmg.blockmap
./packages/app/release/latest-linux.yml
./packages/app/release/latest-mac.yml
./packages/app/release/latest.yml
./packages/app/release/builder-debug.yml

0 comments on commit 32197ac

Please sign in to comment.