Archive Build #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Archive Build' | |
on: | |
workflow_call: | |
inputs: | |
versions: | |
description: 'List of versions. For example: ["95.0.1020.40-1", "114.0.1823.82-1"]' | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
versions: | |
description: 'List of versions. For example: ["95.0.1020.40-1", "114.0.1823.82-1"]' | |
required: true | |
type: string | |
permissions: write-all | |
jobs: | |
archive-build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 1 | |
matrix: | |
version: ${{ fromJSON(github.event.inputs.versions)}} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Check if version was archived already | |
uses: insightsengineering/release-existence-action@main | |
id: check_release | |
with: | |
release-tag: ${{ matrix.version }} | |
- name: Download package | |
if: steps.check_release.outputs.release-exists == 'false' | |
run: | | |
wget -k https://mirror.cs.uchicago.edu/google-chrome/pool/main/g/google-chrome-stable/google-chrome-stable_${{ matrix.version }}_amd64.deb | |
- name: Archive build as GH release | |
if: steps.check_release.outputs.release-exists == 'false' | |
uses: softprops/action-gh-release@master | |
with: | |
files: | | |
google-chrome-stable_${{ matrix.version }}_amd64.deb | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ matrix.version }} | |
name: ${{ matrix.version }} | |
body: ${{ matrix.version }} | |
draft: false | |
prerelease: false |