Skip to content

Commit

Permalink
Add ref names and SHAs to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
KTrain5169 committed Oct 26, 2024
1 parent 15de68a commit 32eeb82
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
- name: Upload Builds
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} build at ${{ github.sha }}
name: translator@${{ github.sha }} ${{ matrix.os }}-build
path: build/

- name: Upload Dists
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} dist at ${{ github.sha }}
name: translator@${{ github.sha }} ${{ matrix.os }}-dist
path: dist/
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ jobs:
- name: Upload debug builds
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_builds
name: translator@${{ github.ref_name }} ${{ matrix.os }}-builds
path: build/*

- name: Upload distributable builds
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}_dists
name: translator@${{ github.ref_name }} ${{ matrix.os }}-dists
path: dist/*

normal_release:
Expand All @@ -75,7 +75,7 @@ jobs:
uses: actions/download-artifact@v4
with:
path: release-artifacts
pattern: "*_dists"
pattern: "translator@*-dists"

- name: List release-artifacts directory # debug
run: ls -R release-artifacts
Expand All @@ -86,22 +86,22 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
tag: ${{ github.ref_name }}
artifacts: release-artifacts/*_dists/*_${{ github.ref_name }}_*
artifacts: release-artifacts/translator@*-dists/*_${{ github.ref_name }}_*
draft: true
name: "Release ${{ github.ref_name }}"
name: "${{ github.ref_name }} Full Release"
body: "If you're using the CLI, we recommend renaming the artifact to something shorter, like 'translator-CLI'."

release_cmdgui:
name: Draft CMDGUI release
runs-on: ubuntu-latest
needs: build
if: ${{ endsWith(github.ref_name, '_CMDGUI') }}
if: ${{ endsWith(github.ref_name, '_CMD') }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: release-artifacts
pattern: "*_dists"
pattern: "translator@*-dists"

- name: List release-artifacts directory # debug
run: ls -R release-artifacts
Expand All @@ -112,10 +112,10 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
tag: ${{ github.ref_name }}
artifacts: release-artifacts/*_dists/*_${{ github.ref_name }}_cmd*
artifacts: release-artifacts/translator@*-dists/*_${{ github.ref_name }}_cmd*
draft: true
name: "CMDGUI Release ${{ github.ref_name }}"
body: "This is a CMDGUI-specific release."
name: "${{ github.ref_name }} CMD Release"
body: "This is a CMD-specific release."

release_cli:
name: Draft CLI release
Expand All @@ -127,7 +127,7 @@ jobs:
uses: actions/download-artifact@v4
with:
path: release-artifacts
pattern: "*_dists"
pattern: "translator@*-dists"

- name: List release-artifacts directory # debug
run: ls -R release-artifacts
Expand All @@ -138,7 +138,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
tag: ${{ github.ref_name }}
artifacts: release-artifacts/*_dists/*_${{ github.ref_name }}_cli*
artifacts: release-artifacts/translator@*-dists/*_${{ github.ref_name }}_cli*
draft: true
name: "CLI Release ${{ github.ref_name }}"
name: "${{ github.ref_name }} CLI Release"
body: "This is a CLI-specific release. We recommend renaming the artifact to something shorter, like 'translator-CLI'."

0 comments on commit 32eeb82

Please sign in to comment.