Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Indy2222 committed Jul 30, 2023
1 parent fb2a161 commit 8c69186
Showing 1 changed file with 44 additions and 42 deletions.
86 changes: 44 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Nightly Release
on:
schedule:
- cron: '30 5 * * *'
pull_request:
branches: 'main'

jobs:
build:
Expand Down Expand Up @@ -40,17 +42,17 @@ jobs:
with:
targets: ${{ matrix.target }}

- name: Rust Cache
uses: actions/cache@v3
id: rust-cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: nightly-${{ steps.rust-toolchain.outputs.cachekey }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
# - name: Rust Cache
# uses: actions/cache@v3
# id: rust-cache
# with:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# target/
# key: nightly-${{ steps.rust-toolchain.outputs.cachekey }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install x86_64-unknown-linux-gnu
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
Expand All @@ -74,7 +76,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'

- name: Build
run: cargo build --release --target ${{ matrix.target }}
run: cargo build --target ${{ matrix.target }}

- name: Prepare Pack
run: |
Expand All @@ -85,11 +87,11 @@ jobs:
- name: Add Windows Binary
if: ${{ matrix.target == 'x86_64-pc-windows-gnu' }}
run: mv target/${{ matrix.target }}/release/de_game.exe DigitalExtinction/de.exe
run: mv target/${{ matrix.target }}/debug/de_game.exe DigitalExtinction/de.exe

- name: Add Non-Windows Binary
if: ${{ matrix.target != 'x86_64-pc-windows-gnu' }}
run: mv target/${{ matrix.target }}/release/de_game DigitalExtinction/de
run: mv target/${{ matrix.target }}/debug/de_game DigitalExtinction/de

- name: Pack
shell: bash
Expand All @@ -104,31 +106,31 @@ jobs:
path: ${{ matrix.target }}/nightly.zip


process:
name: Upload
environment: nightly
needs: build
runs-on: ubuntu-latest
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v3
with:
path: nightly-builds

- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DOWNLOADS_SSH_KEY }}

- name: Git clone and push
run: |
git clone [email protected]:DigitalExtinction/Downloads.git
rsync -avh nightly-builds/ Downloads/
cd Downloads
git config core.fileMode false
git config user.email "[email protected]"
git config user.name "Martin Indra"
git status
git add .
git commit --amend -m "Nightly"
git push --force-with-lease origin main
# process:
# name: Upload
# environment: nightly
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Download All Artifacts
# uses: actions/download-artifact@v3
# with:
# path: nightly-builds

# - name: Set up SSH
# uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.DOWNLOADS_SSH_KEY }}

# - name: Git clone and push
# run: |
# git clone [email protected]:DigitalExtinction/Downloads.git
# rsync -avh nightly-builds/ Downloads/
# cd Downloads
# git config core.fileMode false
# git config user.email "[email protected]"
# git config user.name "Martin Indra"
# git status
# git add .
# git commit --amend -m "Nightly"
# git push --force-with-lease origin main

0 comments on commit 8c69186

Please sign in to comment.