Skip to content

MIME Type Check

MIME Type Check #6

Workflow file for this run

name: Build & Release
on:
release:
types: [ published ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: dom, libxml, mbstring, zip, curl, bcmath, pcntl, inotify
tools: composer:v2
coverage: none
- name: Install Dependencies
run: |
composer install --no-dev --prefer-dist
- name: Remove Inotify Dependency
run: |
composer remove octopyid/laravel-inotify
- name: Set Variables
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build Binary
run: php gphoto app:build --build-version=${{ env.RELEASE_VERSION }}
- name: Automatic Releases
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require("fs").promises;
const { repo: { owner, repo }, sha } = context;
const release = await github.repos.getReleaseByTag({
owner, repo,
tag: process.env.GITHUB_REF.replace("refs/tags/", ""),
});
console.log({ release });
await github.repos.uploadReleaseAsset({
owner, repo,
name: "gphoto-default",
data: await fs.readFile("./builds/gphoto"),
release_id: release.data.id,
});