This commit is contained in:
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
@ -25,8 +25,25 @@ jobs:
|
||||
- name: Build
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Capture build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
||||
- name: Install CIFS Utilities (if not installed)
|
||||
run: sudo apt-get update && sudo apt-get install -y cifs-utils
|
||||
|
||||
- name: Mount SMB Share
|
||||
run: |
|
||||
sudo mkdir -p /mnt/smb
|
||||
sudo mount -t cifs //10.0.0.4/kittenigshare /mnt/smb \
|
||||
-o username=${{ secrets.SMB_USER }},password=${{ secrets.SMB_PASSWORD }},vers=3.0
|
||||
|
||||
- name: Generate Timestamped Directory
|
||||
run: |
|
||||
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
|
||||
TARGET_DIR="/mnt/smb/ChirpCraft/SurvivalFabric/builds/$TIMESTAMP"
|
||||
echo "TARGET_DIR=$TARGET_DIR" >> $GITHUB_ENV
|
||||
sudo mkdir -p "$TARGET_DIR"
|
||||
|
||||
- name: Copy Artifacts to SMB Share
|
||||
run: sudo cp -r build/libs/* "$TARGET_DIR/"
|
||||
|
||||
- name: Unmount SMB Share
|
||||
if: always()
|
||||
run: sudo umount /mnt/smb
|
||||
|
Reference in New Issue
Block a user