Skip to content

THX-1138: Add missing arg. #33

THX-1138: Add missing arg.

THX-1138: Add missing arg. #33

name: Build
on:
pull_request:
types:
- closed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: "Checkout Source"
uses: actions/checkout@v3
with:
lfs: true
fetch-depth: 0
- name: "Setup Environment"
run: |
REPOSITORY=${PWD##*/}
echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV
#FUNCTION=$(cut -d- -f3 <<< ${PWD##*/})
FUNCTION=${PWD##*/}
echo "FUNCTION=$FUNCTION" >> $GITHUB_ENV
- name: Run GitOps Automatic Versioning Action
id: gitops-autover
uses: AlexAtkinson/[email protected]
- name: Set Version Dependent Envars
run: |
VERSION=${{ steps.gitops-autover.outputs.new-version }}
echo "VERSION=$VERSION" >> $GITHUB_ENV
PREVIOUS_VERSION=${{ steps.gitops-autover.outputs.previous-version }}
echo "PREVIOUS-VERSION=$PREVIOUS_VERSION" >> $GITHUB_ENV
ZIPFILE="${FUNCTION}.${VERSION}.zip"
echo "ZIPFILE=$ZIPFILE" >> $GITHUB_ENV
- name: "Build"
run: |
zip -x @.artifactignore -r ${{ env.ZIPFILE }} .
- name: "Github Release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: "${{ env.VERSION }}"
title: "${{ env.VERSION }}"
files: |
${{ env.ZIPFILE }}