Skip to content

Commit

Permalink
Fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aditsachde committed Dec 15, 2020
1 parent f788393 commit 3e32ae7
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 9 deletions.
51 changes: 43 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ jobs:
id: name
run: |
echo "::set-output name=jar::$(ls build/libs)"
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Mod
path: mod/build/libs/*.jar
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
Expand All @@ -62,14 +67,13 @@ jobs:
asset_content_type: application/java-archive

client:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
needs: release
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest

steps:
- uses: actions/checkout@v2
Expand All @@ -91,17 +95,48 @@ jobs:
path: |
client/target/release/proxvoice
client/target/release/proxvoice.exe
- name: Get Binary name
id: name
run: |
echo "::set-output name=binary::$(ls client/target/release)"
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: client/target/release/${{ steps.name.outputs.binary }}
asset_name: ${{ github.ref }}-${{ steps.name.outputs.binary }}
asset_path: client/target/release/proxvoice
asset_name: proxvoice-${{ runner.os }}-${{ github.ref }}
asset_content_type: application/octet-stream

client-windows:
runs-on: windows-latest
needs: release

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path client/Cargo.toml --release
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
REQUEST_SECRET: ${{ secrets.REQUEST_SECRET }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: client-${{ runner.os }}
path: |
client/target/release/proxvoice
client/target/release/proxvoice.exe
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: client/target/release/proxvoice.exe
asset_name: proxvoice-${{ runner.os }}-${{ github.ref }}.exe
asset_content_type: application/octet-stream
2 changes: 1 addition & 1 deletion client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl State {
panic!("Authorization Invalid");
}

let r = ureq::post("http://127.0.0.1:8787")
let r = ureq::post("https://proxvoiceauth.sachde.xyz")
.set("Content-Type", "application/json")
.send_string(&serde_json::to_string(&discord_oauth)?.to_string());
let r = r.into_string()?;
Expand Down

0 comments on commit 3e32ae7

Please sign in to comment.