Skip to content

Commit

Permalink
Fix building tags
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Jun 24, 2024
1 parent 50887f6 commit 406dee7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 24 deletions.
14 changes: 14 additions & 0 deletions .github/actions/checkout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Checkout'
description: 'Properly check out (with tags)'
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
if: !startsWith(github.ref, 'refs/tags/')
with:
fetch-depth: 100
fetch-tags: true
# The action is buggy when building a tag
- run: git fetch origin --tags
shell: bash
if: startsWith(github.ref, 'refs/tags/')
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
fetch-tags: true
- uses: ./.github/actions/checkout
- uses: ./.github/actions/gradle-setup
- name: Generate assets
run: ./gradlew runData
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/export_guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ jobs:
steps:
- name: Install Software OpenGL Rendering
run: sudo apt-get install xvfb libgl1-mesa-dri zopfli
- uses: actions/checkout@v4
with:
fetch-depth: 100
fetch-tags: true
- uses: ./.github/actions/checkout
- uses: ./.github/actions/gradle-setup
- name: Export Guide
run: DRI_PRIME=0 xvfb-run ./gradlew runGuideexport
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/localization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
fetch-tags: true
- uses: ./.github/actions/checkout
- uses: ./.github/actions/gradle-setup
- uses: actions/setup-node@v2
with:
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ jobs:
VERSION: ${{ steps.prepare_artifact_metadata.outputs.VERSION }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
fetch-tags: true
- uses: ./.github/actions/checkout
- uses: ./.github/actions/gradle-setup
- name: Build with Gradle
env:
Expand Down Expand Up @@ -92,10 +89,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
fetch-tags: true
- uses: ./.github/actions/checkout
- uses: ./.github/actions/gradle-setup
- name: Download build artifact
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -145,10 +139,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
fetch-tags: true
- uses: ./.github/actions/checkout
- uses: ./.github/actions/gradle-setup
- name: Download build artifact
uses: actions/download-artifact@v4
Expand Down

0 comments on commit 406dee7

Please sign in to comment.