Skip to content

Commit

Permalink
Make macos dmg nightlies more orderable (#2560)
Browse files Browse the repository at this point in the history
* Make macos dmg nightlies more orderable

Without any tags in the downloaded history, git doesn't know how many
commits happened since latest tag

* Get rid of the custom sftp upload which doesn't work

Rename artifact to .dmg to make it easier to find the correct artifact
to download by custom script
  • Loading branch information
DarthGandalf authored Oct 24, 2023
1 parent 7883d21 commit b53073b
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
cd '${{github.workspace}}'
kvi_version=$(grep -i "^set(VERSION_RELEASE .*)$" CMakeLists.txt | egrep -o '[0-9\.]' | tr -d '\n')
git_desc=$(git describe --always)
echo "dmg_name=KVIrc-$kvi_version-dev-$git_desc" >> "$GITHUB_ENV"
echo "dmg_name=KVIrc-$kvi_version-dev-$(date +%F)-git-$git_desc" >> "$GITHUB_ENV"
- name: Create DMG
shell: bash
Expand All @@ -74,23 +74,5 @@ jobs:
- name: Publish artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.dmg_name }}
name: ${{ env.dmg_name }}.dmg
path: ${{ env.dmg_name }}.dmg

- name: Upload to nightly
shell: bash
env:
NIGHTLY_SFTP_KEY: ${{secrets.NIGHTLY_SFTP_KEY}}
run: |
brew install lftp
echo "$NIGHTLY_SFTP_KEY" > ~/.ssh/upload.key
echo 'nightly.kvirc.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPWXPg8wxcaZqGLfFpS+TxkterxB4luo8e/bxh33poGQ' >> ~/.ssh/known_hosts
echo '' >> ~/.ssh/config
echo 'Host nightly.kvirc.net' >> ~/.ssh/config
echo 'User ${{secrets.NIGHTLY_SFTP_USER}}' >> ~/.ssh/config
echo 'IdentityFile ~/.ssh/upload.key' >> ~/.ssh/config
chmod 600 ~/.ssh/upload.key ~/.ssh/known_hosts ~/.ssh/config
mkdir upload-area
echo '{"bin": "${{ env.dmg_name }}.dmg", "size":' $(wc -c <"${{ env.dmg_name }}.dmg") '}' > upload-area/latest-macos
mv *.dmg upload-area/
lftp -c "connect sftp://nightly.kvirc.net; mirror -R upload-area x"

0 comments on commit b53073b

Please sign in to comment.