Skip to content

2.10.0.RC.1

2.10.0.RC.1 #113

Workflow file for this run

---
name: Release new Version
on:
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: echo release
run: echo $RELEASE
env:
RELEASE: ${{ steps.get_version.outputs.VERSION }}
- name: Checkout
uses: actions/checkout@v3
- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@master
with:
exclude: "vendor/"
find: "##INVENTORIO_VERSION##"
replace: ${{ steps.get_version.outputs.VERSION }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.REPO_TOKEN }}
file: install/install.sh
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.REPO_TOKEN }}
file: install/update.sh
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
ini-values: phar.readonly=0
tools: composer
coverage: none
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--ignore-platform-reqs --no-dev"
- name: Downgrade to php 7.4
run: |
vendor/bin/rector -c .devops/rector-php-74.php
- name: Remove rector
run: |
rm -rf vendor/rector
- name: Remove rector
run: |
rm -rf install/install.sh
- name: Remove phpstan
run: |
rm -rf vendor/phpstan
- name: Download box.phar
run: |
wget https://github.com/box-project/box/releases/download/4.3.8/box.phar -P /tmp/
- name: Run box builder
run: |
php /tmp/box.phar compile
- name: Remove version check from composer in phar file
run: |
php .devops/postbox.php
- name: Move phar file to temp directory
run: |
mv bin/inventorio.phar /tmp
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.REPO_TOKEN }}
file: /tmp/inventorio.phar
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
- name: Send release version as GET request
if: github.event.release.prerelease == false
env:
BASE_URL: 'https://api.inventorio.cloud/inventorio/version/update/42369df1-ed56-4100-a48f-2e0c9ad13871'
run: |
VERSION=${{ github.event.release.tag_name }}
FULL_URL="$BASE_URL/$VERSION"
curl -G "$FULL_URL"
- name: Send release version as GET request (stage)
env:
BASE_URL: 'https://api.stage.inventorio.cloud/inventorio/version/update/42369df1-ed56-4100-a48f-2e0c9ad13871'
run: |
VERSION=${{ github.event.release.tag_name }}
FULL_URL="$BASE_URL/$VERSION"
curl -G "$FULL_URL"