Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify and publish binaries generated by CI #229

Merged
merged 1 commit into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,12 @@ jobs:
name: release binaries
path: release-binary

- name: Download release source archive
uses: actions/[email protected]
with:
name: source archive
path: source-archive

- name: Install tools
run: |
sudo apt-get update
Expand Down Expand Up @@ -479,6 +485,26 @@ jobs:
name: differences between binary from source archive and git
path: ${{ steps.diff.outputs.result }}

- name: Verify archive manifests
run: |
# Verify them by using the manifest builder tool to create a manifest
# for the full bundle.
bin/nim c tools/release_manifest.nim
cd release-binary
../tools/release_manifest add ../source-archive/*.json *.json

# Print the resulting manifest
echo "Success! Generated manifest:"
jq . manifest.json

# This allow the publisher to run the tool directly without having to
# clone the compiler.
- name: Upload release manifest tool
uses: actions/[email protected]
with:
name: release manifest tool
path: tools/release_manifest

passed:
name: All check passed
needs: [binaries, test, tooling, source, source_binaries, package, test_package, orc]
Expand Down
59 changes: 56 additions & 3 deletions .github/workflows/publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,73 @@ jobs:
# Publish action needs a checkout
- uses: actions/[email protected]

# Download the latest instance of generated documentation from the build
# during bors staging.
# Download the latest instance of artifacts from a build done previously
- name: Download generated docs
uses: dawidd6/[email protected]
with:
workflow: ci.yml
workflow_conclusion: completed
workflow_conclusion: success
commit: ${{ github.event.after }}
# Keep up-to-date with ci.yml
name: Generated docs
path: doc/html

- name: Download generated source archive
uses: dawidd6/[email protected]
with:
workflow: ci.yml
workflow_conclusion: success
commit: ${{ github.event.after }}
# Keep up-to-date with ci.yml
name: source archive
path: release-staging

- name: Download generated release binaries
uses: dawidd6/[email protected]
with:
workflow: ci.yml
workflow_conclusion: success
commit: ${{ github.event.after }}
# Keep up-to-date with ci.yml
name: release binaries
path: release-staging

- name: Download release manifest tool
uses: dawidd6/[email protected]
with:
workflow: ci.yml
workflow_conclusion: success
commit: ${{ github.event.after }}
# Keep up-to-date with ci.yml
name: release manifest tool
path: release-staging

- name: Publish docs
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: doc/html

- id: release-files
name: Create release manifest
run: |
# Github Artifacts strip executable permissions so it has to be set again
chmod 755 release_manifest
# Create a new release manifest
./release_manifest add *.json

toUpload=$(./release_manifest files-to-upload --format:github-actions)
echo "::set-output name=result::$toUpload"
echo "::set-output name=version::$(./release_manifest version)"
working-directory: release-staging

- name: Create pre-release
uses: softprops/[email protected]
with:
prerelease: true
files: ${{ steps.release-files.outputs.result }}
tag_name: ${{ steps.release-files.outputs.version }}
fail-on-unmatched-files: true
target_commitish: ${{ github.event.after }}
body: |
Continuous delivery for commit ${{ github.event.after }}
Loading