Skip to content

workflow improvements, I hope #2

workflow improvements, I hope

workflow improvements, I hope #2

Workflow file for this run

name: Deploy
# Put your personal access token in a repository secret named PAT for cross-repository access
permissions:
contents: write
on:
workflow_dispatch:
push:
paths-ignore:
- '*.md'
branches:
- master
- main
- release
env:
INTERNAL_NAME: PositionalGuide
CONFIGURATION: Release
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
jobs:
precheck:
runs-on: ubuntu-latest
outputs:
buildVersion: ${{ steps.data.outputs.buildVersion }}
tagName: ${{ steps.data.outputs.tagName }}
tagExists: ${{ steps.check-version-tag.outputs.tagExists }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Load values
id: data
run: |
buildVersion=$(grep -Ei '<version>[^<]+</version>' "${{ env.INTERNAL_NAME }}/${{ env.INTERNAL_NAME }}.csproj" | sed -e 's/.\+<version>\([^<]\+\)<.\+/\1/i' -)
echo "buildVersion=$buildVersion" >> "$GITHUB_OUTPUT"
echo "tagName=v$buildVersion" >> "$GITHUB_OUTPUT"
shell: bash
- name: Check if version exists
id: check-version-tag
run: |
if git show-ref --quiet --tags "${{ steps.data.outputs.tagName }}"; then echo "tagExists=true" >> "$GITHUB_OUTPUT"; else echo "tagExists=false" >> "$GITHUB_OUTPUT"; fi
shell: bash
- name: Debug
run: |
echo "Current version is ${{ steps.data.outputs.buildVersion }} for tag ${{ steps.data.outputs.tagName }} (exists = ${{ steps.check-version-tag.outputs.tagExists }})"
shell: bash
build:
needs: precheck
if: needs.precheck.outputs.tagExists == 'false'
runs-on: windows-2022
steps:
- name: Compile
uses: ./.github/workflows/compile.yml
tag:
needs:

Check failure on line 59 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 59, Col: 5): Required property is missing: runs-on
- precheck
- build
if: needs.precheck.outputs.tagExists == 'false'
steps:
- name: Tag release commit
run: |
git tag -am "[Automated build $BUILD_VERSION]" "$TAG_NAME"
git push origin "$TAG_NAME"
shell: bash
env:
BUILD_VERSION: ${{ needs.precheck.outputs.buildVersion }}
TAG_NAME: ${{ needs.precheck.outputs.tagName }}
GIT_AUTHOR_NAME: GitHub Action
GIT_COMMITTER_NAME: GitHub Action
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
deploy:
needs: tag
runs-on: ubuntu-latest
steps:
- name: Submit pull request
uses: daemitus/DalamudPluginPR2@master
with:
token: ${{ secrets.PAT }}
plugin_name: ${{ env.INTERNAL_NAME }}
plugin_owners: PrincessRTFM