Skip to content

Commit

Permalink
Upload more artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Dec 16, 2024
1 parent ffef079 commit 445a05d
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 21 deletions.
82 changes: 64 additions & 18 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
required: true
type: string
description: Json job matrix config
build-matrix:
required: true
type: string
description: Json job matrix config

env:
COLUMNS: 190
Expand Down Expand Up @@ -53,36 +57,78 @@ jobs:
run: echo "upload_url=${{ steps.create_release.outputs.upload_url }}" >> "$GITHUB_OUTPUT"

upload-source-tarball:
runs-on: ubuntu-22.04
needs:
- create-github-release
steps:
- uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}.tar.gz
upload_url: ${{ needs.create-github-release.outputs.upload_url }}
uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}.tar.gz
upload_url: ${{ needs.create-github-release.outputs.upload_url }}

upload-onedir:
runs-on: ubuntu-22.04
needs:
- create-github-release
strategy:
matrix:
include: ${{ inputs.matrix }}
steps:
- uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.arch }}.${{ matrix.platform == 'windows' && 'zip' || 'tar.xz' }}
upload_url: ${{ needs.create-github-release.outputs.upload_url }}
uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.arch }}.${{ matrix.platform == 'windows' && 'zip' || 'tar.xz' }}
upload_url: ${{ needs.create-github-release.outputs.upload_url }}

release-artifacts:
name: Download and list all artifacts
upload-deb-packages:
needs:
- create-github-release
strategy:
matrix:
include: ${{ toJSON(fromJSON(inputs.build-matrix)['linux']) }}
uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb
upload_url: ${{ needs.create-github-release.outputs.upload_url }}

upload-rpm-packages:
needs:
- create-github-release
strategy:
matrix:
include: ${{ toJSON(fromJSON(inputs.build-matrix)['linux']) }}
uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm
upload_url: ${{ needs.create-github-release.outputs.upload_url }}

upload-mac-packages:
runs-on: ubuntu-22.04
needs:
- create-github-release
strategy:
matrix:
${{ fromJSON(inputs.matrix)['linux'] }}
steps:
- name: Echo upload url
run: echo ${{ needs.create-github-release.outputs.upload_url }}
include: ${{ toJSON(fromJSON(inputs.build-matrix)['linux']) }}
uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos
upload_url: ${{ needs.create-github-release.outputs.upload_url }}

upload-windows-msi-packages:
runs-on: ubuntu-22.04
needs:
- create-github-release
strategy:
matrix:
include: ${{ toJSON(fromJSON(inputs.build-matrix)['windows']) }}
uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI
upload_url: ${{ needs.create-github-release.outputs.upload_url }}

upload-windows-nsis-packages:
runs-on: ubuntu-22.04
needs:
- create-github-release
strategy:
matrix:
include: ${{ toJSON(fromJSON(inputs.build-matrix)['windows']) }}
uses: ./.github/workflows/release-artifact.yml
with:
name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS
upload_url: ${{ needs.create-github-release.outputs.upload_url }}
2 changes: 1 addition & 1 deletion .github/workflows/release-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
description: Release's upload url.


steps:
jobs:

list-files:
name: List Files From Artifact
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,11 @@ jobs:
if: |
always() && (needs.test.result == 'success' || needs.test.result == 'skipped') &&
(needs.test-packages.result == 'success' || needs.test-packages.result == 'skipped') &&
needs.prepare-workflow.result == 'success' && needs.build-pkgs-onedir.result == 'success'
needs.prepare-workflow.result == 'success' && needs.build-pkgs-onedir.result == 'success' &&
needs.pre-commit.result == 'success'
needs:
- prepare-workflow
- pre-commit
- build-pkgs-onedir
- test-packages
- test
Expand All @@ -666,6 +668,7 @@ jobs:
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['artifact-matrix']) }}
build-matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}

set-pipeline-exit-status:
# This step is just so we can make github require this step, to pass checks
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/templates/staging.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,11 @@ on:
if: |
always() && (needs.test.result == 'success' || needs.test.result == 'skipped') &&
(needs.test-packages.result == 'success' || needs.test-packages.result == 'skipped') &&
needs.prepare-workflow.result == 'success' && needs.build-pkgs-onedir.result == 'success'
needs.prepare-workflow.result == 'success' && needs.build-pkgs-onedir.result == 'success' &&
needs.pre-commit.result == 'success'
needs:
- prepare-workflow
- pre-commit
- build-pkgs-onedir
- test-packages
- test
Expand All @@ -195,6 +197,7 @@ on:
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['artifact-matrix']) }}
build-matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}


<%- endblock jobs %>

0 comments on commit 445a05d

Please sign in to comment.