Skip to content

Commit

Permalink
Merge pull request #834 from product-os/kyle/wildcard-release-artifacts
Browse files Browse the repository at this point in the history
Allow wildcards in the GH release artifact names
  • Loading branch information
flowzone-app[bot] authored Dec 19, 2023
2 parents 95f90fa + 33db99e commit 6b9b7ee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
19 changes: 8 additions & 11 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,18 @@ runs:
echo "${SECRETS}"
echo "${VARIABLES}"
# https://github.com/marketplace/actions/github-app-token
- name: Generate GitHub App installation token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: gh_app_installation_token
with:
app_id: ${{ fromJSON(inputs.json).app_id }}
installation_retrieval_mode: id
installation_retrieval_payload: ${{ fromJSON(inputs.json).installation_id }}
private_key: ${{ fromJSON(inputs.secrets).GH_APP_PRIVATE_KEY }}
permissions: ${{ fromJSON(inputs.json).token_scope }}
- name: Create artifact
id: artifact
shell: bash
run: |
path="$(mktemp)"
echo "Hello, World!" > "${path}"
echo "path=${path}" >> "${GITHUB_OUTPUT}"
# Test publishing release artifacts to github
- name: Upload generated flowzone.yml
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
with:
name: gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ strategy.job-index }}
path: .github/workflows/flowzone.yml
path: ${{ steps.artifact.outputs.path }}
retention-days: 1
4 changes: 2 additions & 2 deletions .github/workflows/flowzone.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions flowzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2912,8 +2912,8 @@ jobs:
tag_name: ${{ github.event.pull_request.head.ref }}
draft: true
prerelease: true
# Publish anything added to with the gh-release name
files: ${{ runner.temp }}/gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}/*
# Publish anything added to with the gh-release- prefix
files: ${{ runner.temp }}/gh-release-*/*

github_finalize:
name: Finalize GitHub release
Expand Down Expand Up @@ -3098,7 +3098,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}
name: gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ strategy.job-index }}
path: ${{ needs.cargo_test.outputs.package }}-${{ matrix.target }}.tar.zst
retention-days: 1

Expand Down

0 comments on commit 6b9b7ee

Please sign in to comment.