40 lines
989 B
YAML
40 lines
989 B
YAML
# Vendors Go modules and publishes tarball
|
|
name: tarball
|
|
on:
|
|
push:
|
|
branches:
|
|
- "fullbuild"
|
|
tags:
|
|
- "v*"
|
|
schedule:
|
|
- cron: "17 1 * * *"
|
|
|
|
jobs:
|
|
generate_tarball:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- 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 }}"
|
|
cache-key-suffix: "-tarball-${{ steps.goversion.outputs.version }}"
|
|
|
|
- name: Generate the release tarball
|
|
run: ./script/maketarball.bash
|
|
|
|
- name: Upload release tarball
|
|
run: ./script/ghpublish.bash ooni-probe-cli-*.tar.gz
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|