-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ name: Nightly Release | |
on: | ||
schedule: | ||
- cron: '30 5 * * *' | ||
pull_request: | ||
branches: 'main' | ||
|
||
jobs: | ||
build: | ||
|
@@ -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' }} | ||
|
@@ -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: | | ||
|
@@ -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 | ||
|
@@ -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 |