mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 04:52:03 -08:00
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:
parent
a891914b9a
commit
40bcdc6def
4 changed files with 80 additions and 41 deletions
76
.github/workflows/build.yml
vendored
Normal file
76
.github/workflows/build.yml
vendored
Normal 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
3
.gitignore
vendored
|
|
@ -5,6 +5,7 @@
|
|||
/.vscode
|
||||
_old/
|
||||
dist/
|
||||
bin/
|
||||
/bundle/fonts/extra
|
||||
launch
|
||||
launch.exe
|
||||
|
|
@ -12,4 +13,4 @@ launch.exe
|
|||
__pycache__/
|
||||
*.pyc
|
||||
wget-log
|
||||
*.kate-swp
|
||||
*.kate-swp
|
||||
|
|
|
|||
38
appveyor.yml
38
appveyor.yml
|
|
@ -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
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
module launch
|
||||
|
||||
go 1.22.5
|
||||
go 1.23
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue