-
Couldn't load subscription status.
- Fork 941
Description
What happened?
I have a packaging.yml workflow that builds RPM and DEB packages to upload into the Release. All workflows and their steps complete successfully, the artifacts are also generated. I use the upload-artifact@v4 at the last step which completes successfully; however, when I look at the tagged release that indirectly triggered the packaging.yml workflow, none of the uploaded artifacts appear (RPM & DEB packages).
What did you expect to happen?
That the artifact caesarx-1.1.2-1.clys.x86_64.deb be:
- Uploaded without zipping, i.e. not
caesarx-1.1.2-1.clys.x86_64.deb.zip - Uploaded to a *named release on the repository, in this case tagged as
v1.1.2
How can we reproduce it?
- Stage, Commit, Tag and Push to remote repository
- Create a release with the created tag
- Multi platform Release workflow
release.ymlreleases binaries in .tar.gz format that are uploaded to the release (this works perfectly). This workflow is triggered on a created release - When the previous workflow completes successfully the Debian and RPM Packaging workflow
packaging.ymlis triggered. This also completes successfully, except the artifacts disappear into the ether.
Anything else we need to know?
Things to consider
- The 1st workflow (Multi platform Release) is triggered on a created release
- The 2nd workflow (Debian and RPM Packaging) workflow is triggered on workflow_run
The trigger portion of the 1st Workflow:
# Create a Release Package for all known platforms.
name: Multi platform Release
on:
release:
types: [created]
The trigger portion of the 2nd Workflow (depends on the first):
# DEB & RPM Build & Packaging of GO project v1.0
name: Debian and RPM Packaging
on:
workflow_run:
workflows: [Multi platform Release]
types:
- completed
env:
DIST: clys
ARCH: x86_64
jobs:
success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo 'The Release workflow completed successfully.'
failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The Release workflow failed.'
exit:
needs: failure
runs-on: ubuntu-latest
steps:
- run: exit 1
extractTag:
runs-on: ubuntu-latest
outputs:
my_version: ${{ steps.tagStep.outputs.my_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract version from version.go
id: tagStep
run: echo "my_version=$(grep -m 1 'MANUAL_VERSION' version.go | sed -E 's/.*\"([^\"]+)\".*/\1/')" >> $GITHUB_OUTPUT
use-tag:
needs: extractTag
runs-on: ubuntu-latest
steps:
- name: Use the tag name
run: echo "The tag name is ${{ needs.extractTag.outputs.my_version }}"
The use-tag step prints this: The tag name is 1.1.2 which corresponds to the GitHub tagged release v1.1.2
Here is the result of the upload action (BTW, why is it zipping the RPM / DEB packages? is there a way for NOT zipping it?)
Run actions/upload-artifact@v4
with:
name: caesarx-1.1.2-1.clys.x86_64.deb
path: caesarx*.deb
if-no-files-found: warn
compression-level: 6
overwrite: false
include-hidden-files: false
env:
DIST: clys
ARCH: x86_64
PKG_NAME: caesarx
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 1507182
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact zip is b930ddeaa766a98e4e415c13004dab70f680e3d3d6fec23e8c024f7fa10fa5a5
Finalizing artifact upload
Artifact caesarx-1.1.2-1.clys.x86_64.deb.zip successfully finalized. Artifact ID 4370891857
Artifact caesarx-1.1.2-1.clys.x86_64.deb has been successfully uploaded! Final size is 1507182 bytes. Artifact ID is 4370891857
What version of the action are you using?
v4
What are your runner environments?
linux
Are you on GitHub Enterprise Server? If so, what version?
No response