diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 760d4b92d..c3fa7c76e 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -6,6 +6,7 @@ on: - "release/**" - "fullbuild" - "desktopbuild" + - "fix/desktop-action" tags: - "v*" schedule: @@ -29,6 +30,13 @@ jobs: cache-key-suffix: "-windows-${{ steps.goversion.outputs.version }}" - run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu + + - run: | + echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key + echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age + env: + PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }} + PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }} - run: make DESKTOP/linux @@ -52,6 +60,13 @@ jobs: with: go-version: "${{ steps.goversion.outputs.version }}" cache-key-suffix: "-windows-${{ steps.goversion.outputs.version }}" + + - run: | + echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key + echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age + env: + PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }} + PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }} - run: make DESKTOP/darwin @@ -75,18 +90,18 @@ jobs: with: go-version: "${{ steps.goversion.outputs.version }}" cache-key-suffix: "-windows-${{ steps.goversion.outputs.version }}" + + - run: | + echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key + echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age + env: + PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }} + PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }} - - name: Install oomobile - run: | - go install github.com/ooni/oomobile/cmd/gomobile@latest - go install github.com/ooni/oomobile/cmd/gobind@latest - go get github.com/ooni/oomobile/bind@latest - - - name: Init oomobile - run: gomobile init + - name: Add Git Bash to PATH + run: echo "C:\Program Files\Git\bin" >> $env:GITHUB_PATH - - name: Run bind - run: gomobile bind -target java/amd64 -o DESKTOP/oonimkall.jar ./pkg/oonimkall + - run: make DESKTOP/windows - uses: actions/upload-artifact@v4 with: diff --git a/Makefile b/Makefile index 5d1c879e5..80002d78e 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,7 @@ ios: search/for/zip search/for/xcode #help: The `make DESKTOP/windows` command builds the oonimkall jar for windows. .PHONY: DESKTOP/windows DESKTOP/windows: search/for/java - ./script/go.bash run ./internal/cmd/buildtool desktop oomobile --target=windows + go run ./internal/cmd/buildtool desktop oomobile --target=windows #help: #help: The `make DESKTOP/darwin` command builds the oonimkall jar for darwin. diff --git a/internal/cmd/buildtool/desktop.go b/internal/cmd/buildtool/desktop.go index 1c20523ab..3168a0e8d 100644 --- a/internal/cmd/buildtool/desktop.go +++ b/internal/cmd/buildtool/desktop.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "path/filepath" "runtime" @@ -35,6 +36,7 @@ func desktopSubcommand() *cobra.Command { // desktopBuildOomobile invokes the oomobile build. func desktopBuildOomobile(deps buildtoolmodel.Dependencies, targetOs string) { + fmt.Println(targetOs) deps.PsiphonMaybeCopyConfigFiles() deps.GolangCheck() @@ -47,6 +49,8 @@ func desktopBuildOomobile(deps buildtoolmodel.Dependencies, targetOs string) { } config.envp.Append("GOOS", targetOs) + fmt.Println(targetOs) + // NOTE: we only support windows builds on amd64 for now if targetOs == "windows" { log.Infof("detected GOOS: %s, setting target as amd64", runtime.GOOS)