Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop migration #947

Closed
wants to merge 295 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
be3677c
Add release workflow for desktop
atavism Nov 30, 2023
2844dc0
Add release workflow for desktop
atavism Nov 30, 2023
f917be6
Add release workflow for desktop
atavism Nov 30, 2023
e446773
install flutter on windows latest
atavism Nov 30, 2023
768feb7
install flutter on windows latest
atavism Nov 30, 2023
9602a30
update flashlight
atavism Nov 30, 2023
6b2c045
Update go version, clean-ups
atavism Nov 30, 2023
6b1a151
Update desktop release workflow
atavism Nov 30, 2023
0c5bcbe
Update desktop release workflow
atavism Nov 30, 2023
7166b54
Update desktop release workflow
atavism Nov 30, 2023
025a0ee
don't trigger browserstack ci for now
atavism Nov 30, 2023
f1f2229
Update Activate protoc-gen-dart step
atavism Nov 30, 2023
bfe8eea
re-use home and lantern app widgets on desktop
atavism Nov 30, 2023
2d2c946
update README
atavism Nov 30, 2023
bc6a56a
Add build-darwin.yml
atavism Nov 30, 2023
e340208
Add build-darwin.yml
atavism Nov 30, 2023
f1473c3
fix typo
atavism Nov 30, 2023
c45c2d0
attempt to use latest Flutter release in CI
atavism Nov 30, 2023
98f5408
Update flutter_inappwebview
atavism Nov 30, 2023
e10c0d6
update cached_network_image
atavism Nov 30, 2023
4062676
pro client updates
atavism Nov 30, 2023
6cf5355
remove unused
atavism Nov 30, 2023
6c3b5db
fix vpn status
atavism Nov 30, 2023
b095aa9
remove unused macos directory
atavism Nov 30, 2023
69a8957
Update Flutter version
atavism Dec 4, 2023
f874c89
Update Flutter version
atavism Dec 4, 2023
0833e11
Update flutter_inappwebview version
atavism Dec 4, 2023
f8c220e
Update flutter_inappwebview version
atavism Dec 4, 2023
ce25151
Update Flutter dependencies
atavism Dec 4, 2023
6d7ace6
Add sign installer step
atavism Dec 4, 2023
db8eb35
Add sign installer step
atavism Dec 4, 2023
567036e
update sign installer needs
atavism Dec 4, 2023
32389eb
use latest version of Xcode
atavism Dec 4, 2023
ed89f68
flutter pub get
atavism Dec 4, 2023
fb38b77
Update Xcode version
atavism Dec 4, 2023
98770e6
Update Xcode version
atavism Dec 4, 2023
9a83ff3
Update Xcode version
atavism Dec 4, 2023
ae6e394
Set xcode version
atavism Dec 4, 2023
5c994c1
Set xcode version
atavism Dec 4, 2023
155f6e4
Set xcode version
atavism Dec 4, 2023
ea13ac5
Update build-windows.yml
atavism Dec 4, 2023
617bffc
Update build-windows.yml
atavism Dec 4, 2023
1cc5e55
Update build-windows.yml
atavism Dec 4, 2023
8807de8
Update build-windows.yml
atavism Dec 4, 2023
6b83cfd
Update build-darwin.yml
atavism Dec 4, 2023
4a8c2e9
Update build-windows.yml
atavism Dec 4, 2023
59f7109
Update build-windows.yml
atavism Dec 4, 2023
4ba98ab
Update build-windows.yml
atavism Dec 4, 2023
ca4afcb
Add upload windows step
atavism Dec 5, 2023
1dd6d54
Fix indentation
atavism Dec 5, 2023
994dc88
upload darwin binary to s3
atavism Dec 5, 2023
4f5b1e5
Add payment methods to pro client and fix issue displaying checkout page
atavism Dec 5, 2023
9d8f1a7
Update node version
atavism Dec 5, 2023
e77eff6
Update build-darwin.yml
atavism Dec 5, 2023
243dc9f
working system tray
atavism Dec 5, 2023
a5249a2
working system tray
atavism Dec 5, 2023
d7620b3
remove Lantern systray
atavism Dec 5, 2023
8e4b162
enable authorize device for pro screen, add request link code to pro …
atavism Dec 5, 2023
8285f94
Add installer resources
atavism Dec 5, 2023
fbaebab
Update build windows github action
atavism Dec 6, 2023
696312f
Update build windows github action
atavism Dec 6, 2023
25c2c96
Update build windows github action
atavism Dec 6, 2023
3be2689
Update build windows github action
atavism Dec 6, 2023
68c826b
Fix conditionals in build liblantern.dylib step
atavism Dec 6, 2023
544c180
Update build windows github action
atavism Dec 6, 2023
954c16f
Update library name based on platform
atavism Dec 6, 2023
932cd7c
update how liblantern path is resolved
atavism Dec 6, 2023
aea40ac
quick test
atavism Dec 6, 2023
7f662a9
Update path
atavism Dec 6, 2023
b257467
Update path
atavism Dec 6, 2023
f4a7726
use toFilePath
atavism Dec 6, 2023
ca728d3
use toFilePath
atavism Dec 6, 2023
06ff305
quick test
atavism Dec 6, 2023
486d441
quick test
atavism Dec 6, 2023
b127f17
Update path
atavism Dec 6, 2023
ef0e8b1
update Makefile
atavism Dec 6, 2023
0d69ac1
Update desktop app Makefile target
atavism Dec 6, 2023
2b756e6
Update desktop app Makefile target
atavism Dec 6, 2023
5b37597
Update push to s3 step
atavism Dec 6, 2023
47b1bf2
Update go build flags
atavism Dec 6, 2023
8441b40
updates for working desktop app on windows
atavism Dec 6, 2023
338e4a7
updates for app to work on Windows
atavism Dec 8, 2023
8603173
disable pro user for windows test
atavism Dec 8, 2023
2b40639
merge latest
atavism Dec 8, 2023
7825f7d
merge latest
atavism Dec 8, 2023
4a21a4c
update windows app icon
atavism Dec 8, 2023
50bc02e
Call user create on startup
atavism Dec 8, 2023
e3e4eb4
Add fetchOrCreate call
atavism Dec 8, 2023
4ac4e9e
support stripe payments and reporting issues
atavism Dec 10, 2023
60516ca
use country and language from settings
atavism Dec 10, 2023
aa56b68
Rename androidlantern to Lantern
atavism Dec 10, 2023
2510d44
use flashlight pro client
atavism Dec 10, 2023
2631769
update flashlight
atavism Dec 10, 2023
c11f20d
Update Windows app name
atavism Dec 11, 2023
9b1657b
copy liblantern.dll to installer resources during build
atavism Dec 11, 2023
f9097ea
clean-ups, setup logging
atavism Dec 11, 2023
af9043b
enable file logging
atavism Dec 11, 2023
f4b2d81
Update app name in darwin installer
atavism Dec 11, 2023
8fa7465
Update app name in darwin installer
atavism Dec 11, 2023
97107db
Update app name in darwin installer
atavism Dec 11, 2023
d6a3239
update i18nInit
atavism Dec 11, 2023
26b451c
show referral code on invite friends page, updates to upload windows …
atavism Dec 11, 2023
60e37b2
Add .packaged-lantern.yaml
atavism Dec 11, 2023
68c5e85
Update upload-windows step
atavism Dec 11, 2023
8254061
Update upload-windows step
atavism Dec 11, 2023
0a63256
Update upload-windows step
atavism Dec 11, 2023
0ca8990
Update to latest flashlight with more details kernel arch data
myleshorton Dec 12, 2023
2d5429b
Merge pull request #963 from getlantern/myle/update-flashlight-kernel…
myleshorton Dec 12, 2023
b2801bc
turned down logging
myleshorton Dec 12, 2023
ba05e3e
stripping dht lookup for desktop parity
myleshorton Dec 12, 2023
dfc1fd2
remove defunct instrumented response writer
myleshorton Dec 12, 2023
92284d3
Add linux support
atavism Dec 13, 2023
00431a5
Update flashlight and add linux support
atavism Dec 13, 2023
17268c6
Update flashlight and add linux support
atavism Dec 13, 2023
47a5d11
use latest node to fix issue installing appdmg
atavism Dec 13, 2023
2136b26
move download artifact step
atavism Dec 13, 2023
69e5d07
move download artifact step
atavism Dec 13, 2023
7a8ecf3
move download artifact step
atavism Dec 13, 2023
4821c25
remove path from download artifact
atavism Dec 13, 2023
3259006
enable notifications loop and more logs
myleshorton Dec 13, 2023
8b1b315
attempt to enable autoupdates
atavism Dec 14, 2023
15f7f0c
attempt to enable autoupdates
atavism Dec 14, 2023
aa1d164
attempt to enable autoupdates
atavism Dec 14, 2023
fffd8b7
bumped flashlight
myleshorton Dec 14, 2023
318f1d2
Merge remote-tracking branch 'origin/main' into atavism/ios-migrate-d…
atavism Dec 19, 2023
4de76cf
merge latest
atavism Dec 19, 2023
f146ad1
Add build linux step to release workflow
atavism Dec 20, 2023
1d9e925
Update build-linux.yml
atavism Dec 20, 2023
0f700d7
Add build flutter app step
atavism Dec 20, 2023
3689746
Add linux build directory
atavism Dec 20, 2023
89bf264
install ninja-build tool
atavism Dec 20, 2023
0c352c5
install ninja-build tool
atavism Dec 20, 2023
5066346
Add libgstreamer dependency
atavism Dec 20, 2023
7d63140
Add libgstreamer dependency
atavism Dec 20, 2023
1e51d47
Add libgstreamer dependency
atavism Dec 20, 2023
46f0ad8
install cmake
atavism Dec 20, 2023
0af2beb
Add libstdc++ dependency
atavism Dec 20, 2023
6c070a9
Add libstdc++ dependency
atavism Dec 20, 2023
7b70821
skip copying native assets during linux build
atavism Dec 20, 2023
a64c166
skip copying native assets during linux build
atavism Dec 20, 2023
c687a80
Add require-bundler
atavism Dec 20, 2023
8dbecf9
update windows installer name
atavism Dec 20, 2023
ada55a2
quick test
atavism Dec 20, 2023
a520677
Update fpm-debian-build
atavism Dec 20, 2023
86c18f6
Autoupdate changes, add update client and check for updates
atavism Dec 20, 2023
32185ad
Autoupdate changes
atavism Dec 20, 2023
2caecc1
updates to build app on linux
atavism Dec 21, 2023
b59eeee
Update library name on linux
atavism Dec 21, 2023
a87d75c
Update go.sum
atavism Dec 21, 2023
d7fe140
update flashlight and sysproxy
atavism Dec 21, 2023
d61ecd2
Updates to add linux support
atavism Dec 21, 2023
4c86774
Update release-changelog.yml
jay-418 Dec 22, 2023
7aa4c41
locate liblantern.so in current working directory
atavism Dec 22, 2023
1a2f26b
copy liblantern.so to bundle directory
atavism Dec 22, 2023
3f44ae2
Update fpm-debian-build
atavism Dec 22, 2023
b59b283
skip copying native assets during linux build
atavism Dec 22, 2023
ee5b3c6
update bundle directory
atavism Dec 22, 2023
81aa86b
Update dist-suffix
atavism Dec 22, 2023
6fdfbc1
print directory contents
atavism Dec 22, 2023
de4037c
Update dist-suffix
atavism Dec 22, 2023
f06ea45
update bundle directory
atavism Dec 22, 2023
f806543
Update fpm-debian-build
atavism Dec 22, 2023
17553f2
Update Makefile target
atavism Dec 22, 2023
90ac32f
Add Gemfile
atavism Dec 22, 2023
8736f0c
Add missing vars
atavism Dec 22, 2023
97a408d
update push binaries step
atavism Dec 22, 2023
dde5bc9
notarize darwin installer
atavism Dec 22, 2023
dfba885
Add osxcodesign calls
atavism Dec 22, 2023
4932067
Add osxcodesign calls
atavism Dec 22, 2023
db99061
test just signing installer for now
atavism Dec 22, 2023
950bfec
Update flutter version used in android build
atavism Dec 22, 2023
ea66996
print directory contents
atavism Dec 22, 2023
3432f9b
print directory contents
atavism Dec 22, 2023
86616a0
sign windows installer
atavism Dec 22, 2023
b4ee4b7
Update build windows
atavism Dec 26, 2023
3511112
Update zip step
atavism Dec 26, 2023
7a00522
Update zip step
atavism Dec 26, 2023
768fec1
update create archive step
atavism Dec 26, 2023
0b02942
change update suffix
atavism Dec 26, 2023
be833a8
Update arch input param
atavism Dec 26, 2023
024b589
Update arch input param
atavism Dec 26, 2023
07bc9f1
Update arch input param
atavism Dec 26, 2023
fc9b235
Update arch input param
atavism Dec 26, 2023
7e46b25
Update arch input param
atavism Dec 26, 2023
b674600
Update upload artifact
atavism Dec 26, 2023
85873cd
Update upload installer step
atavism Dec 26, 2023
ae288b3
Update upload installer step
atavism Dec 26, 2023
30b7ac0
Update upload installer step
atavism Dec 26, 2023
a77a15e
Add data directory and dlls when building windows installer
atavism Dec 27, 2023
1c8e20c
Add data directory and dlls when building windows installer
atavism Dec 27, 2023
ce8e5d6
copy liblantern.dll to release directory
atavism Dec 27, 2023
b81d536
copy liblantern.dll to release directory
atavism Dec 27, 2023
e0d771d
copy liblantern.dll to release directory
atavism Dec 27, 2023
4ac4504
copy liblantern.dll to release directory
atavism Dec 27, 2023
cf7f4e3
Call i18n.SetMessagesFunc and add GetTranslations
atavism Dec 27, 2023
7ca3835
Call i18n.SetMessagesFunc and add GetTranslations
atavism Dec 27, 2023
5dd6b19
Add payment redirect
atavism Jan 1, 2024
2a5ed0e
Add payment redirect
atavism Jan 1, 2024
15035e3
payment redirect updates and add isDesktop helper function
atavism Jan 2, 2024
f24cae4
set system tray icon based on lantern connection status
atavism Jan 2, 2024
4de3525
set system tray icon based on lantern connection status
atavism Jan 2, 2024
756295d
Update flashlight
atavism Jan 2, 2024
40a5b89
dismiss dialog when reporting an issue on desktop
atavism Jan 2, 2024
83c4500
update darwin installer
atavism Jan 2, 2024
a43d21c
add imagemagick step
atavism Jan 2, 2024
704d343
Try running on macos latest
atavism Jan 2, 2024
eb6a005
remove debug flag
atavism Jan 2, 2024
01b229f
update directory
atavism Jan 2, 2024
52d0947
Update executable name in info plist
atavism Jan 2, 2024
4d28d77
update macos version
atavism Jan 2, 2024
751051a
copy dylib to resources directory
atavism Jan 2, 2024
2f9d7d5
update package-darwin
atavism Jan 2, 2024
2ce6c49
update package-darwin
atavism Jan 2, 2024
939936e
update package-darwin
atavism Jan 2, 2024
a86e5d9
Add back windows code signing step
atavism Jan 2, 2024
69df77d
update azure-code-signing-action
atavism Jan 2, 2024
600a2ca
update azure-code-signing-action
atavism Jan 2, 2024
534971c
copy dylib to frameworks directory
atavism Jan 3, 2024
3385eac
copy dylib to frameworks directory
atavism Jan 3, 2024
759ba39
Update osxcodesign
atavism Jan 3, 2024
f6e1ea2
temporarily disable notarization
atavism Jan 3, 2024
6e642e3
Attempt to notarize installer again
atavism Jan 4, 2024
645bc64
Attempt to notarize installer again
atavism Jan 4, 2024
f43d714
Attempt to notarize installer again
atavism Jan 4, 2024
aa6646e
Attempt to notarize installer again
atavism Jan 4, 2024
31c95fa
Attempt to notarize installer again
atavism Jan 4, 2024
fd49f17
Update CFBundleExecutable
atavism Jan 4, 2024
367a52f
Update CFBundleExecutable
atavism Jan 4, 2024
19fa5a6
update flashlight
atavism Jan 5, 2024
2bcef1b
Update macos release entitlements
atavism Jan 7, 2024
3a9a3ce
Update macos release entitlements
atavism Jan 7, 2024
8aec7c0
sign liblantern.dylib in frameworks directory
atavism Jan 7, 2024
1579a89
sign liblantern.dylib in frameworks directory
atavism Jan 7, 2024
c971f09
sign liblantern.dylib in frameworks directory
atavism Jan 7, 2024
28b432c
sign liblantern.dylib in frameworks directory
atavism Jan 7, 2024
1940ab5
notarize darwin installer again
atavism Jan 8, 2024
771a1ac
Update go.yml
reflog Jan 11, 2024
36950b5
revert recent Makefile changes, attempt to notarize installer again
atavism Jan 11, 2024
7c5af52
Update notarize-darwin.py
atavism Jan 11, 2024
ba2adaa
Update notarize-darwin
atavism Jan 11, 2024
4f5aca3
Update notarize-darwin
atavism Jan 12, 2024
5a6bc5e
Use tray manager instead of system tray (#977)
atavism Jan 14, 2024
5704212
Bump jinja2 from 3.0.3 to 3.1.3 in /scripts/screenshot_generation_ass…
dependabot[bot] Jan 16, 2024
1573d90
Bump fonttools in /scripts/screenshot_generation_assets (#971)
dependabot[bot] Jan 16, 2024
40a8ef2
update notarize-darwin.py
atavism Jan 16, 2024
dc4cb88
fix permissions
atavism Jan 16, 2024
662119e
Merge remote-tracking branch 'origin/main' into atavism/ios-migrate-d…
atavism Jan 23, 2024
f54cde6
Update flashlight, temporarily disable notarization
atavism Jan 23, 2024
276b088
sign liblantern.dylib in Frameworks only
atavism Jan 24, 2024
a6b3fde
Makefile updates
atavism Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# template for auto-generated release notes
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

changelog:
# exclude:
# labels:
# - ignore-for-release
# authors:
# - octocat
categories:
- title: ✨ Major Features
labels:
- epic
- title: 🪲 Bug Fixes
labels:
- bug
- cs
- title: 📱 Team Apps
labels:
- team_apps
- title: 📶 Team SDK
labels:
- team_sdk
- title: 🛠️ Team Infra
labels:
- team_infra
- telemetry
3 changes: 1 addition & 2 deletions .github/workflows/browerstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: BrowserStack CI
on:
push:
branches: [ ios-migrate ]
pull_request:
branches: [ ios-migrate ]

env:
GOPRIVATE: github.com/getlantern

Expand Down
150 changes: 150 additions & 0 deletions .github/workflows/build-darwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: Build Darwin
on:
workflow_call:
inputs:
version_file:
type: string
required: true
version:
type: string
required: true
prefix:
type: string
required: true

env:
GOPRIVATE: github.com/getlantern
S3_BUCKET: lantern
jobs:
build-darwin:
permissions:
contents: "read"
id-token: "write"
env:
version: ${{ inputs.version }}
version_file: ${{ inputs.version_file }}
prefix: ${{ inputs.prefix }}
AC_USERNAME: [email protected]
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
runs-on: macos-13
steps:
- uses: actions/checkout@v3
with:
lfs: true

- name: Pull LFS objects
run: git lfs pull

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.21

- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 14.3.1

- name: Granting private modules access
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"

- name: Repo access
run: |
mkdir /tmp/cache
echo "machine github.com login ${{ secrets.GH_TOKEN }} password x-oauth-basic" > /tmp/cache/.netrc
chmod 600 /tmp/cache/.netrc

- name: Setup Sentry CLI
uses: mathieu-bour/setup-sentry-cli@v1
with:
version: latest
token: ${{ SECRETS.SENTRY_TOKEN }} # from GitHub secrets
organization: getlantern
project: android

- name: Build liblantern.dylib
run: go build -buildmode=c-shared -o desktop/liblantern.dylib desktop/lib.go

- uses: actions/upload-artifact@v3
with:
name: libgo-mac-build
if-no-files-found: error
path: |
desktop/liblantern.dylib

# Install Flutter
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
channel: "stable"

- run: flutter --version

- name: Setup protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Activate protoc-gen-dart plugin
run: |
dart pub global activate protoc_plugin

- name: Build Flutter app
run: flutter build macos --release

- uses: actions/setup-node@v4
with:
node-version: latest

- name: Install darwin installer dependencies
run: |
npm install -g appdmg
brew tap joshdk/tap
brew install joshdk/tap/retry
brew install imagemagick

- name: Build darwin installer
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p temporaty-password build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p temporaty-password build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k temporaty-password build.keychain
make package-darwin
env:
VERSION: "${{ env.version }}"
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERT }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERT_PASS }}

- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install s3cmd
run: pip install s3cmd

- name: Set s3cmd permissions
run: |
echo "[default]" > "$HOME/.s3cfg"
echo "access_key = ${{ secrets.AWS_ACCESS_KEY }}" >> "$HOME/.s3cfg"
echo "secret_key = ${{ secrets.AWS_SECRET_KEY }}" >> "$HOME/.s3cfg"

- uses: actions/upload-artifact@v3
with:
name: osx-build
retention-days: 2
path: |
lantern-installer.dmg

- name: Push binaries to s3
env:
VERSION: "${{ env.version }}"
DMG: "${{ env.prefix }}-${{ env.version }}.dmg"
run: |
mv lantern-installer.dmg "$DMG"
cp "$DMG" ${{ env.prefix }}.dmg
echo ${{ env.version }} > ${{ env.version_file }}
shasum -a 256 "$DMG" | cut -d " " -f 1 > "$DMG".sha256
cp "$DMG".sha256 ${{ env.prefix }}.dmg.sha256
s3cmd put --acl-public "$DMG" ${{ env.version_file }} "$DMG".sha256 ${{ env.prefix }}.dmg.sha256 ${{ env.prefix }}.dmg "s3://lantern"
119 changes: 119 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Build Linux
on:
workflow_call:
inputs:
version:
type: string
required: true
prefix:
type: string
required: true
dist-suffix: # "arm64" or "amd64"
type: string
required: true

jobs:
build-linux:
permissions:
contents: "read"
id-token: "write"
env:
version: ${{ inputs.version }}
prefix: ${{ inputs.prefix }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Granting private modules access
run: git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
- name: Repo access
run: |
mkdir /tmp/cache
echo "machine github.com login ${{ secrets.GH_TOKEN }} password x-oauth-basic" > /tmp/cache/.netrc
chmod 600 /tmp/cache/.netrc

- name: Install dependencies
run: |
sudo apt-get install -y file build-essential pkg-config
sudo apt-get install -y libunwind-dev libstdc++-12-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-d cmake
sudo apt-get install -y libgtk-3-0 libblkid1 liblzma5
sudo apt-get install -y libpcap-dev libgtk-3-dev libayatana-appindicator3-dev ruby ruby-dev && sudo gem install bundler -v 2.2.26

- uses: actions/setup-go@v3
with:
go-version: 1.21

- name: Build
env:
VERSION: ${{ inputs.version }}
run: |
make linux-amd64

- uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install s3cmd
run: pip install s3cmd

- name: Set s3cmd permissions
run: |
echo "[default]" > "$HOME/.s3cfg"
echo "access_key = ${{ secrets.AWS_ACCESS_KEY }}" >> "$HOME/.s3cfg"
echo "secret_key = ${{ secrets.AWS_SECRET_KEY }}" >> "$HOME/.s3cfg"

# Install Flutter
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
channel: "stable"

- run: flutter --version

- name: Setup protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Activate protoc-gen-dart plugin
run: |
dart pub global activate protoc_plugin

- uses: seanmiddleditch/gha-setup-ninja@master

- name: Build Flutter app
run: flutter build linux

- name: Build installer
run: |
cp liblantern.so "build/linux/${{inputs.dist-suffix}}/release/bundle"
VERSION="${{ inputs.version }}" make "package-linux-${{inputs.dist-suffix}}"

- uses: actions/upload-artifact@v3
with:
name: linux-build
path: |
lantern_${{inputs.version}}_x64.deb

- name: Push binaries to s3

env:
VERSION: "${{ inputs.version }}"
dist_versionless: "${{inputs.prefix}}-64-bit.deb"
dist: "${{inputs.prefix}}-${{inputs.version}}-64-bit.deb"
update: "lantern_update_linux_x64-${{inputs.version}}.bz2"
dist_source: "lantern_${{inputs.version}}_x64.deb"
update_source: lantern_update_linux_x64.bz2

run: |
ls -l
mv ${{ env.dist_source }} ${{ env.dist }}
mv ${{ env.update_source }} ${{ env.update }}
cp ${{ env.dist }} ${{ env.dist_versionless }}

shasum -a 256 ${{ env.dist }} | cut -d " " -f 1 > ${{ env.dist }}.sha256
shasum -a 256 ${{ env.update }} | cut -d " " -f 1 > ${{ env.update }}.sha256
cp ${{ env.dist }}.sha256 ${{ env.dist_versionless }}.sha256
ls -l

s3cmd put --acl-public ${{ env.dist }} ${{ env.update }} ${{ env.update }}.sha256 ${{ env.dist }}.sha256 ${{ env.dist_versionless }}.sha256 ${{ env.dist_versionless }} "s3://lantern"
Loading
Loading