Refactor: Rename project from Equilotl to Privcord Installer #1
Workflow file for this run
This file contains hidden or 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
| # Based partially on Alyxia's work, thanks so much! | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| env: | |
| FORCE_COLOR: true | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: write-all | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y pkg-config libsdl2-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libglx-dev libgl1-mesa-dev libxxf86vm-dev libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules | |
| - name: Install Go dependencies | |
| run: go get -v | |
| - name: Build GUI | |
| run: CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -v -tags "static gui" -ldflags "-s -w -X 'vencord/buildinfo.InstallerGitHash=$(git rev-parse --short HEAD)' -X 'vencord/buildinfo.InstallerTag=${{ github.ref_name }}'" -o Privcord-x11 | |
| - name: Build CLI | |
| run: CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -v -tags "cli" -ldflags "-s -w -X 'vencord/buildinfo.InstallerGitHash=$(git rev-parse --short HEAD)' -X 'vencord/buildinfo.InstallerTag=${{ github.ref_name }}'" -o PrivcordCli-linux | |
| - name: Update executable | |
| run: | | |
| chmod +x Privcord* | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Privcord-linux | |
| path: | | |
| Privcord-x11 | |
| PrivcordCli-linux | |
| build-mac: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - id: go-cache-paths | |
| run: | | |
| echo "go_build=$(go env GOCACHE)" >> $GITHUB_ENV | |
| echo "go_mod=$(go env GOMODCACHE)" >> $GITHUB_ENV | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/Library/Caches/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install dependencies | |
| run: brew install pkg-config sdl2 | |
| - name: Install Go dependencies | |
| run: go get -v | |
| - name: Build GUI | |
| run: CGO_CFLAGS="-mmacosx-version-min=10.15" CGO_LDFLAGS="-mmacosx-version-min=10.15" CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -v -tags "static gui" -ldflags "-s -w -X 'vencord/buildinfo.InstallerGitHash=$(git rev-parse --short HEAD)' -X 'vencord/buildinfo.InstallerTag=${{ github.ref_name }}'" -o Privcord | |
| - name: Update executable | |
| run: | | |
| chmod +x Privcord* | |
| - name: Generate MacOS GUI bundle | |
| run: | | |
| mkdir -p Privcord.app/Contents/MacOS | |
| mkdir -p Privcord.app/Contents/Resources | |
| cp macos/Info.plist Privcord.app/Contents/Info.plist | |
| mv Privcord Privcord.app/Contents/MacOS/Privcord | |
| cp macos/icon.icns Privcord.app/Contents/Resources/icon.icns | |
| zip -r Privcord.MacOS.zip Privcord.app | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Privcord-macos | |
| path: | | |
| Privcord.MacOS.zip | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~\AppData\Local\go-build | |
| ~\go\pkg\mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Setup MSYS2 | |
| uses: msys2/setup-msys2@v2 | |
| - name: Install Windows dependencies | |
| shell: msys2 {0} | |
| run: | | |
| pacman -S --noconfirm git mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-go | |
| export GOROOT=/mingw64/lib/go | |
| export GOPATH=/mingw64 | |
| - name: Install Go dependencies | |
| shell: msys2 {0} | |
| run: | | |
| export GOROOT=/mingw64/lib/go | |
| export GOPATH=/mingw64 | |
| go get -v | |
| go install github.com/tc-hib/go-winres@latest | |
| - name: Build GUI | |
| shell: msys2 {0} | |
| run: | | |
| export GOROOT=/mingw64/lib/go | |
| export GOPATH=/mingw64 | |
| go-winres make --product-version "git-tag" | |
| CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -v -tags "static gui" -ldflags "-s -w -H=windowsgui -extldflags=-static -X 'vencord/buildinfo.InstallerGitHash=$(git rev-parse --short HEAD)' -X 'vencord/buildinfo.InstallerTag=${{ github.ref_name }}'" -o Privcord.exe | |
| - name: Build CLI | |
| shell: msys2 {0} | |
| run: | | |
| export GOROOT=/mingw64/lib/go | |
| export GOPATH=/mingw64 | |
| CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -v -tags "cli" -ldflags "-s -w -X 'vencord/buildinfo.InstallerGitHash=$(git rev-parse --short HEAD)' -X 'vencord/buildinfo.InstallerTag=${{ github.ref_name }}'" -o PrivcordCli.exe | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Privcord-windows | |
| path: | | |
| Privcord.exe | |
| PrivcordCli.exe | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-mac, build-windows] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: "Download Linux Artifacts" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: Privcord-linux | |
| path: linux | |
| - name: "Download MacOS Artifacts" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: Privcord-macos | |
| path: macos | |
| - name: "Download Windows Artifacts" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: Privcord-windows | |
| path: windows | |
| - name: Create the release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: ${{ github.ref_name }} | |
| token: ${{ env.GITHUB_TOKEN }} | |
| generate_release_notes: true | |
| make_latest: true | |
| prerelease: false | |
| draft: false | |
| body: | | |
| This is release ${{ github.ref_name }} of Privcord. | |
| files: | | |
| linux/Privcord-x11 | |
| linux/PrivcordCli-linux | |
| macos/Privcord.MacOS.zip | |
| windows/Privcord*.exe |