Skip to content

build-screenshots-tarball #23

build-screenshots-tarball

build-screenshots-tarball #23

# This is a basic workflow to help you get started with Actions
name: build-screenshots-tarball
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "4.30" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
build-screenshots-branch:
description: "Branch to use for build-screenshots"
default: "4.30"
required: true
logLevel:
description: 'Log level'
required: true
default: 'debug'
type: choice
options:
- info
- warning
- debug
env:
workdir: archives
version: "4.30"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Set the release date
id: release-date
run: echo "RELEASE_DATE=$(date '+%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: Output the release date
run: echo "release date ${{ steps.release-date.outputs.RELEASE_DATE }}"
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout build-screenshots branch
uses: actions/checkout@v3
with:
path: ${{ env.workdir }}
ref: ${{ github.event.inputs.build-screenshots-branch }}
- name: release
uses: actions/create-release@v1
id: create-release
with:
draft: false
prerelease: false
release_name: "${{ env.RELEASE_NAME }} ${{ env.RELEASE_DATE }}"
tag_name: "${{ env.RELEASE_VERSION }}"
body: "Release ${{ env.version }}"
env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_VERSION: ${{ env.version }}
RELEASE_DATE: ${{ steps.release-date.outputs.RELEASE_DATE }}
- name: upload release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
TARBALL: "build-screenshots-${{ env.version }}"
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ${{ env.workdir }}
asset_name: ${{ env.TARBALL }}
asset_content_type: application/gzip