Skip to content

Commit

Permalink
Switch to upload-artifact v4 (#78)
Browse files Browse the repository at this point in the history
* Switch to upload-artifact v4

* Add PR#

* Split up CI to avoid upload conflicts

* Add warning

* Reword
  • Loading branch information
hynek committed Dec 15, 2023
1 parent 337438e commit 2385bed
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 25 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci-argon2-cffi-bindings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: CI w/ argon2-cffi-bindings

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

env:
FORCE_COLOR: "1" # Make tools pretty.
SETUPTOOLS_SCM_PRETEND_VERSION: "1.0" # avoid warnings about shallow checkout

jobs:
check-argon2-cffi-bindings:
name: Build & verify the argon2-cffi-bindings package.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
repository: hynek/argon2-cffi-bindings
submodules: recursive
path: hynek/argon2-cffi-bindings

- uses: actions/checkout@v4
with:
path: action

- uses: ./action
id: baipp
with:
path: hynek/argon2-cffi-bindings
22 changes: 1 addition & 21 deletions .github/workflows/ci.yml → .github/workflows/ci-structlog.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: CI
name: CI w/ structlog

on:
push:
Expand Down Expand Up @@ -33,23 +33,3 @@ jobs:
path: structlog

- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }}

check-argon2-cffi-bindings:
name: Build & verify the argon2-cffi-bindings package.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
repository: hynek/argon2-cffi-bindings
submodules: recursive
path: hynek/argon2-cffi-bindings

- uses: actions/checkout@v4
with:
path: action

- uses: ./action
id: baipp
with:
path: hynek/argon2-cffi-bindings
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [UNRELEASED](https://github.com/hynek/build-and-inspect-python-package/compare/v1.5.4...main)

### Changed

- Switched to using v4 of `actions/upload-artifact`.
This version is incompatible with older versions of `actions/download-artifact` -- hence the major version bump.
See also [GitHub's announcement](https://github.blog/changelog/2023-12-14-github-actions-artifacts-v4-is-now-generally-available/).
[#78](https://github.com/hynek/build-and-inspect-python-package/pull/78)


## [1.5.4](https://github.com/hynek/build-and-inspect-python-package/compare/v1.5.3...v1.5.4) - 2023-11-01

### Fixed
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ jobs:
- uses: hynek/build-and-inspect-python-package@v1
```

> [!CAUTION]
> Internally, *build-and-inspect-python-package* uses [*actions/upload-artifact*](https://github.com/actions/upload-artifact) for storing the built artifacts that you can download with [*actions/download-artifact*](https://github.com/actions/download-artifact).
>
> Unfortunately, v4 of both [is incompatible](https://github.blog/changelog/2023-12-14-github-actions-artifacts-v4-is-now-generally-available/) with previous versions, so you have to make sure that your *download-artifact* version matches the version that *build-and-inspect-python-package* uses for uploading.
>
> If you're using `download-artifact@v3`, you have to use `build-and-inspect-python-package@v1`.
> If you're using `download-artifact@v4`, you have to use `build-and-inspect-python-package@v2`.

### Inputs

Expand All @@ -59,7 +67,7 @@ After a successful run, you'll find multiple artifacts in the run's Summary view

---

[Our CI](.github/workflows/ci.yml) uses all inputs and outputs, if you want to see them in action.
[Our CI](.github/workflows/) uses all inputs and outputs, if you want to see them in action.


## License
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ runs:
working-directory: ${{ inputs.path }}

- name: Upload built artifacts.
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Packages
path: /tmp/baipp/dist/*
Expand Down Expand Up @@ -101,7 +101,7 @@ runs:
echo ----- End of Metadata -----
- name: Upload metadata
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Package Metadata
path: /tmp/baipp/dist/out/sdist/*/PKG-INFO
Expand All @@ -124,7 +124,7 @@ runs:
'
- name: Upload PyPI README
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: PyPI README
path: /tmp/baipp/dist/out/sdist/PyPI-README.*

0 comments on commit 2385bed

Please sign in to comment.