Skip to content

fix wrong cursor inference in the context of loops (#1388) #991

fix wrong cursor inference in the context of loops (#1388)

fix wrong cursor inference in the context of loops (#1388) #991

Workflow file for this run

name: Publish built artifacts
on:
push:
branches:
- devel
# Run every script actions in bash
defaults:
run:
shell: bash
# Since we will be pushing, make sure that only one instance can run at a time.
concurrency: publisher
jobs:
publisher:
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
environment:
name: release
url: ${{ steps.release.outputs.url }}
steps:
# Repository required for changelog builder
- uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: |
.github
- name: Obtain latest successful run id
id: finder
run: |
run_id=$(gh run list \
-c "$COMMIT" \
-w "$WORKFLOW" \
-s "$CONCLUSION" \
--limit 1 \
--json databaseId \
--jq '.[].databaseId')
if [[ -z $run_id ]]; then
echo "::error::Could not find any CI run for commit $COMMIT"
exit 1
fi
echo "run_id=$run_id" >> "$GITHUB_OUTPUT"
env:
COMMIT: ${{ github.event.after }}
WORKFLOW: ci.yml
CONCLUSION: success
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
# Download the latest instance of artifacts from a build done previously
- name: Download generated source archive
uses: actions/download-artifact@v4
with:
run-id: ${{ steps.finder.outputs.run_id }}
# Keep up-to-date with ci.yml
name: source archive
path: release-staging
github-token: ${{ github.token }}
- name: Download generated release binaries
uses: actions/download-artifact@v4
with:
run-id: ${{ steps.finder.outputs.run_id }}
# Keep up-to-date with ci.yml
pattern: release binaries *
merge-multiple: "true"
path: release-staging
github-token: ${{ github.token }}
- name: Download release manifest tool
uses: actions/download-artifact@v4
with:
run-id: ${{ steps.finder.outputs.run_id }}
# Keep up-to-date with ci.yml
name: release manifest tool
path: release-staging
github-token: ${{ github.token }}
- 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)
delimiter=EOF-$(uuidgen)
cat <<EOF >> $GITHUB_OUTPUT
result<<$delimiter
$toUpload
$delimiter
EOF
echo "version=$(./release_manifest version)" >> $GITHUB_OUTPUT
working-directory: release-staging
- id: release
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 }}
- id: changelog
name: Create release changelog
uses: mikepenz/[email protected]
with:
configuration: ".github/changelog.json"
toTag: ${{ steps.release-files.outputs.version }}
failOnError: true
- name: Push changelog
uses: softprops/[email protected]
with:
tag_name: ${{ steps.release-files.outputs.version }}
body: ${{ steps.changelog.outputs.changelog }}