Skip to content

ReleaseCandidate

ReleaseCandidate #21

Workflow file for this run

name: ReleaseCandidate
on:
# push:
# branches:
# - master
# tags:
# - 'v*'
workflow_dispatch:
inputs:
reason:
description: 'Launch reason'
required: true
default: 'Create new release candidate'
jobs:
github-job-release:
name: Ubuntu
runs-on: [ubuntu-20.04]
steps:
- name: Install base dependencies
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake gcc make wget unzip gettext default-jdk libxml2-dev libssl-dev libcurl4-openssl-dev libsnmp-dev libevent-dev libsqlite3-dev libpcre2-dev libssh2-1-dev libopenipmi-dev unixodbc-dev libldap2-dev libconfig-dev
sudo apt-get install -y libmysqlclient-dev
sudo wget https://github.com/sass/dart-sass/releases/download/1.54.5/dart-sass-1.54.5-linux-x64.tar.gz -O /tmp/dart-sass-linux-x64.tar.gz
sudo tar -zxf /tmp/dart-sass-linux-x64.tar.gz -C /tmp && yes | sudo cp /tmp/dart-sass/sass /usr/local/sbin && sudo rm -rf /tmp/dart-sass dart-sass-linux-x64.tar.gz
- name: Checkout code
uses: actions/checkout@v2
- name: Build zabbix distr
run: |
./bootstrap.sh
./configure
make dbschema
make gettext
make css
make dist
echo "ZABBIX_VERSION=$(cat configure | grep PACKAGE_VERSION= | cut -d = -f2 | tr -d \')" >> $GITHUB_ENV
echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV
- name: Delete old drafts releases
uses: hugo19941994/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create new prerelease
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "latest"
release_name: Zabbix v${{ env.ZABBIX_VERSION }} (${{ env.GITHUB_SHA_SHORT }}) (unofficial) release candidate
draft: false
prerelease: true
- name: Upload draft release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./zabbix-${{ env.ZABBIX_VERSION }}.tar.gz
asset_name: zabbix-${{ env.ZABBIX_VERSION }}.tar.gz
asset_content_type: application/gzip