feat: autogen GH workflows and split build, test, and publish (#971)

Closes https://github.com/ooni/probe/issues/2337.
This commit is contained in:
Simone Basso 2022-10-03 14:20:54 +02:00 committed by GitHub
commit 5466f30526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 990 additions and 142 deletions

View file

@ -1,21 +1,20 @@
# Builds for iOS and publishes packages
# File generated by `go run ./GHGEN`; DO NOT EDIT.
name: ios
on:
push:
branches:
- "release/**"
- "fullbuild"
- "iosbuild"
tags:
- "v*"
schedule:
- cron: "17 1 * * *"
jobs:
build_and_publish:
runs-on: macos-10.15
permissions: # See https://github.com/ooni/probe/issues/2154
contents: write
build_ios_mobile:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
with:
@ -24,7 +23,6 @@ jobs:
- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
@ -37,10 +35,38 @@ jobs:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make EXPECTED_XCODE_VERSION=12.4 MOBILE/ios
- run: make EXPECTED_XCODE_VERSION=13.2.1 MOBILE/ios
- run: |
./script/ghpublish.bash ./MOBILE/ios/oonimkall.xcframework.zip \
./MOBILE/ios/oonimkall.podspec
- uses: actions/upload-artifact@v2
with:
name: oonimkall.xcframework.zip
path: ./MOBILE/ios/oonimkall.xcframework.zip
- uses: actions/upload-artifact@v2
with:
name: oonimkall.podspec
path: ./MOBILE/ios/oonimkall.podspec
publish_ios_mobile:
runs-on: ubuntu-20.04
needs: build_ios_mobile
permissions:
contents: write
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/download-artifact@v2
with:
name: oonimkall.xcframework.zip
- uses: actions/download-artifact@v2
with:
name: oonimkall.podspec
- run: ./script/ghpublish.bash oonimkall.xcframework.zip oonimkall.podspec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# End of autogenerated file