mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-12-02 07:24:51 +00:00
99 lines
2.8 KiB
YAML
99 lines
2.8 KiB
YAML
name: Release generic source archives
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'v1.10'
|
|
- 'v1.11'
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: 'Branch, tag, or SHA to build tarball from'
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
source:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
path: 'code'
|
|
ref: ${{ inputs.ref || github.ref }}
|
|
|
|
- name: Checkout reusable actions
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: signalwire/actions-template
|
|
ref: main
|
|
fetch-depth: 1
|
|
path: actions
|
|
persist-credentials: false
|
|
sparse-checkout: |
|
|
.github/actions/rclone-s3-sync/action.yml
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -y \
|
|
devscripts \
|
|
libtool \
|
|
libtool-bin \
|
|
zip \
|
|
tar \
|
|
gzip \
|
|
bzip2 \
|
|
xz-utils
|
|
|
|
- name: Run source tarball script
|
|
shell: bash
|
|
working-directory: ./code
|
|
run: ./scripts/ci/src_tarball.sh
|
|
|
|
- name: Generate checksums
|
|
shell: bash
|
|
working-directory: ./code/../src_dist
|
|
run: |
|
|
find . \( -iname '*.tar.bz2' -o -iname '*.tar.gz' -o -iname '*.tar.xz' -o -iname '*.zip' \) | while read file; do
|
|
echo $(md5sum $(basename $file)) > $file.md5
|
|
echo $(sha1sum $(basename $file)) > $file.sha1
|
|
echo $(sha256sum $(basename $file)) > $file.sha256
|
|
done
|
|
|
|
- name: Pack source archives directory
|
|
shell: bash
|
|
run: tar -czvf source_archives.tar.gz -C ./code/../src_dist .
|
|
|
|
- name: List contents
|
|
shell: bash
|
|
run: |
|
|
tar -tvzf source_archives.tar.gz
|
|
|
|
- name: Upload source tarball to GCS
|
|
if: github.event_name != 'workflow_dispatch'
|
|
uses: ./actions/.github/actions/rclone-s3-sync
|
|
with:
|
|
SRC: 'source_archives.tar.gz'
|
|
DST: 'freeswitch/public/release/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}/source_archives.tar.gz'
|
|
SYNC_TYPE: local-to-remote
|
|
OPERATION: copyto
|
|
S3_PROVIDER: gcs-oidc
|
|
S3_BUCKET: gcs-prod-us-central1-ci-packages-1
|
|
GCS_WORKLOAD_IDENTITY_PROVIDER: projects/560294807735/locations/global/workloadIdentityPools/github/providers/infrastructure-lives
|
|
|
|
- name: Upload source tarball as artifact
|
|
if: github.event_name == 'workflow_dispatch'
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: source_archives
|
|
path: source_archives.tar.gz
|