Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Add api auth system (#91)
Browse files Browse the repository at this point in the history
* ignore keyfile

* added key embedded in the app

* fixed wrokflow

* add step to nightly
  • Loading branch information
JensvandeWiel authored Nov 8, 2023
1 parent 1766729 commit c27d915
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ jobs:
- name: Set direct proxy
run: go env -w GOPROXY=direct
- run: go install github.com/wailsapp/wails/cmd/wails@latest
- name: Create api KEY file
run: echo "${{ secrets.API_TOKEN }}" > KEY
- name: Update wails.json
run: node build/updateConfig.js ${{ github.ref_name }} false
run: node build/updateConfig.js ${{ github.ref_name }} false
- uses: dAppServer/[email protected]
with:
build-name: ${{ matrix.build.name }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d')"
- name: Create api KEY file
run: echo "${{ secrets.API_TOKEN }}" > KEY
- name: Update wails.json
run: node build/updateConfig.js ${{ steps.date.outputs.date }}.${{ github.run_number }} true
- uses: dAppServer/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,5 @@ fabric.properties
!installer/steamcmd.exe
!build/windows/installer/VC_redist.x64.exe
!build/windows/installer/VC_redist.x86.exe
steamcmd
steamcmd
KEY
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ var assets embed.FS
//go:embed wails.json
var WailsConfigFile []byte

//go:embed KEY
var KEY string

const (
logFilePath = "main.log"
)
Expand Down

0 comments on commit c27d915

Please sign in to comment.