Skip to content

Advene packaging workflow #39

Advene packaging workflow

Advene packaging workflow #39

Workflow file for this run

name: Advene packaging workflow
on:
push:
tags:
- 'release/*'
workflow_dispatch:
inputs:
tags:
description: 'build tags'
required: false
jobs:
windows:
runs-on: windows-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
with:
# Note: we are using fetch-depth: 0 here to fetch the whole
# history and especially tags, since we use git describe
# afterwards to generate the installer filename.
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git
- name: "Build package"
shell: msys2 {0}
run: |
cd dev/win_installer
./build.sh
cd ../..
ARTIFACT_PATHNAME=$(ls dev/win_installer/advene-*-installer.exe | head -n 1)
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME)
echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
- name: "Upload binary as artifact"
uses: actions/upload-artifact@v2
with:
path: dev/win_installer/advene-*-installer.exe
- name: "Create Release"
id: create_release
uses: actions/create-release@v1
# Do not execute step if we do not have a tag.
# If we invoke by event trigger, then it
# will create a refs/heads/master tag which will make a
# mess. See
# https://github.com/actions/create-release/issues/13#issuecomment-629741295
# for more details.
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: "Upload Release Asset"
id: upload-release-asset
uses: actions/[email protected]
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.ARTIFACT_PATHNAME }}
asset_name: ${{ env.ARTIFACT_NAME }}
asset_content_type: application/octet-stream