CI/CD: Migrate from Appveyor to Github Actions

Migrated to GH Actions to avoid 60 minute time quota, local storage limit, and cache limit.
This commit is contained in:
daijro 2024-08-14 05:16:42 -05:00
parent a891914b9a
commit 40bcdc6def
4 changed files with 80 additions and 41 deletions

76
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,76 @@
name: Build and Release
on:
push:
tags:
- "*"
env:
MOZBUILD_PATH: ${{ github.workspace }}/.mozbuild
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.23"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y msitools p7zip-full aria2
- name: Cache .mozbuild
uses: actions/cache@v2
with:
path: ${{ env.MOZBUILD_PATH }}
key: ${{ runner.os }}-mozbuild-${{ hashFiles('**/Makefile') }}
restore-keys: |
${{ runner.os }}-mozbuild-
- name: Setup and bootstrap
run: |
make setup-minimal
make mozbootstrap
mkdir -p dist
- name: Build
run: |
python3 ./multibuild.py --target linux windows macos --arch x86_64
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: CamoufoxBuilds
path: dist/*
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/*
asset_name: CamoufoxBuilds
asset_content_type: application/zip

3
.gitignore vendored
View file

@ -5,6 +5,7 @@
/.vscode /.vscode
_old/ _old/
dist/ dist/
bin/
/bundle/fonts/extra /bundle/fonts/extra
launch launch
launch.exe launch.exe
@ -12,4 +13,4 @@ launch.exe
__pycache__/ __pycache__/
*.pyc *.pyc
wget-log wget-log
*.kate-swp *.kate-swp

View file

@ -1,38 +0,0 @@
version: 1.0.{build}
image: Ubuntu
environment:
MOZBUILD_PATH: /home/appveyor/.mozbuild
cache:
- /home/appveyor/.mozbuild
# Only build on tags
skip_non_tags: true
init:
- export PATH=/home/appveyor/venv3.11/bin:$PATH
install:
- sudo apt-get install -y msitools aria2
- make setup-minimal
- make mozbootstrap
- mkdir -p dist
build_script:
- python3 ./multibuild.py --target windows macos linux --arch x86_64
artifacts:
- path: dist/*
name: CamoufoxBuilds
deploy:
provider: GitHub
auth_token:
secure: $(GITHUB_TOKEN)
artifact: CamoufoxBuilds
draft: true
prerelease: false
on:
APPVEYOR_REPO_TAG: true

View file

@ -1,7 +1,7 @@
module launch module launch
go 1.22.5 go 1.23
require github.com/mileusna/useragent v1.3.4 require github.com/mileusna/useragent v1.3.4
require github.com/goccy/go-json v0.10.3 // indirect require github.com/goccy/go-json v0.10.3