Skip to content

Commit

Permalink
Merge pull request #78 from rmartin16/artifacts
Browse files Browse the repository at this point in the history
Upgrade `upload-artifact` and `download-artifact` actions to v4
  • Loading branch information
freakboy3742 authored Jan 5, 2024
2 parents 2b35385 + ca9b888 commit ca12a7d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/app-build-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Get Briefcase Packages
# Briefcase will build and package itself in a previous step in its CI
if: endsWith(inputs.repository, 'briefcase')
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0
with:
name: packages-briefcase
path: dist
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:
briefcase package web static
- name: Upload Failure Logs
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
if: failure()
with:
name: build-failure-logs-${{ inputs.runner-os }}-${{ inputs.framework }}-${{ inputs.python-version }}-${{ inputs.target-platform }}-${{ inputs.target-format }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/app-create-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Get Briefcase Package
# Briefcase will build and package itself in a previous step in its CI
if: endsWith(github.repository, 'briefcase')
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.0
with:
name: packages-briefcase
path: dist
Expand Down Expand Up @@ -121,8 +121,8 @@ jobs:
assert pyproject_toml.is_file()
pprint(toml.load(pyproject_toml))
- name: Upload failure logs
uses: actions/upload-artifact@v3.1.3
- name: Upload Failure Logs
uses: actions/upload-artifact@v4.0.0
if: failure()
with:
name: build-failure-logs-${{ inputs.runner-os }}-${{ inputs.framework }}-${{ inputs.python-version }}
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/python-package-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ on:
type: string
outputs:
artifact-name:
description: "Name of the uploaded artifact; use for artifact retrieval."
description: >
Name of the uploaded artifact; use for artifact retrieval.
Note that if a `build-subdirectory` is specified, this value will be the "base" of the artifact name.
For instance, if the `core` subdirectory of Toga is being built, then this value will be `packages-toga`
but the name of the uploaded artifact will be `packages-toga-core`.
Therefore, when a `build-subdirectory` is used with this workflow, the `pattern` input for the
`actions\download-artifact` should be used to specify `${ needs.package.outputs.artifact-name }-*`.
value: ${{ jobs.package.outputs.artifact-name }}

env:
Expand All @@ -51,7 +57,7 @@ jobs:
artifact-name: packages-${{ steps.package.outputs.name }}
steps:

- name: Determine Package name
- name: Determine Package Name
id: package
run: echo "name=$(basename '${{ inputs.repository }}')" >> ${GITHUB_OUTPUT}

Expand All @@ -76,17 +82,17 @@ jobs:
- name: Install tox
run: python -m pip install ${{ inputs.tox-source }}

- name: Build wheels
- name: Build Wheels
if: inputs.build-subdirectory == ''
run: tox -e package${{ inputs.tox-factors }}

- name: Build wheels from subdirectory
- name: Build Wheels from Subdirectory
if: inputs.build-subdirectory != ''
run: tox -e package${{ inputs.tox-factors }} -- ${{ inputs.build-subdirectory }}

- name: Upload Package
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.0.0
with:
name: packages-${{ steps.package.outputs.name }}
name: packages-${{ steps.package.outputs.name }}${{ inputs.build-subdirectory && format('-{0}', inputs.build-subdirectory) || '' }}
path: ${{ inputs.distribution-path }}
if-no-files-found: error

0 comments on commit ca12a7d

Please sign in to comment.