Skip to content

Commit

Permalink
actual workflow improvements because fuck github
Browse files Browse the repository at this point in the history
  • Loading branch information
PrincessRTFM committed Jan 14, 2024
1 parent 1250b8f commit 8e44a8d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 17 deletions.
50 changes: 34 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Build

# Put your personal access token in a repository secret named PAT for cross-repository access
permissions:
Expand Down Expand Up @@ -48,26 +48,44 @@ jobs:
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
- 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
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1.3
- name: Download Dalamud
run: |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev\"
- name: Restore
run: dotnet restore -r win
- name: Build
run: dotnet build -c ${{ env.CONFIGURATION }} --no-restore
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: PluginRepoZip
path: ${{ env.INTERNAL_NAME }}/bin/${{ env.CONFIGURATION }}/${{ env.INTERNAL_NAME }}
if-no-files-found: error
retention-days: 14
- name: Tag
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: build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ permissions:

on:
workflow_dispatch:
workflow_call:
pull_request:
paths-ignore:
- '*.md'
Expand Down

0 comments on commit 8e44a8d

Please sign in to comment.