Skip to content

Commit

Permalink
Moving on
Browse files Browse the repository at this point in the history
  • Loading branch information
davisp committed Feb 17, 2025
1 parent d0cd9db commit b811a4d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 54 deletions.
29 changes: 29 additions & 0 deletions .github/scripts/generate-release.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env python

import os
import sys

def main():
if len(sys.argv) != 4:
print("usage: %s CURRENT_ARTIFACTS_DIR NEW_ARTIFACTS_DIR RELEASE_DIR" % sys.argv[0])
exit(1)

curr_dir = sys.argv[1]
new_dir = sys.argv[2]
rel_dir = sys.argv[3]

for dname in [curr_dir, new_dir, rel_dir]:
print("Walking:", dname)
for root, dnames, fnames in os.walk(dname):
for fname in fnames:
fname = os.path.join(root, fname)
print(fname)


with open("release-data/releases.csv", "w") as handle:
handle.write("Lol, wut?")
with open("release-data/releases.csv.sha256") as handle:
handle.write("Secret of the Hashes!")

if __name__ == "__main__":
main()
10 changes: 0 additions & 10 deletions .github/scripts/generate-releases-csv.py

This file was deleted.

68 changes: 24 additions & 44 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ jobs:
MATRIX=$(.github/scripts/generate-build-matrix.py)
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
debug:
needs:
- generate-matrix
name: Debuggering
runs-on: ubuntu-latest
steps:
- name: Show Matrix
run: |
echo "${{ needs.generate-matrix.outputs.matrix }}"
shell: bash

build:
needs:
- generate-matrix
Expand Down Expand Up @@ -131,18 +120,37 @@ jobs:
publish:
needs:
- build
name: Publish Release Artifacts
name: Publish Release
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
- name: Checkout
uses: actions/checkout@v4
- name: Create Directories
run: |
mkdir current new release
shell: bash
- name: Downloading Current Release
uses: KevinRohn/github-full-release-data@v2.0.4
with:
version: "nightlies"
asset-file: "*.zip,*.tar.gz"
asset-output: current
- name: Show Current
run: |
find current -type f | sort
shell: bash
- name: Download New Artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist
- name: Show Downloaded
path: new
- name: Show New
run: |
find . -type f | sort
find new -type f | sort
shell: bash
- name: Generate Release
run: |
.github/scripts/generate-release.py current new release
- name: Publish Artifacts
uses: pyTooling/Actions/releaser/composite@main
with:
Expand All @@ -151,34 +159,6 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
files: ./dist/*

generate-releases-csv:
needs:
- publish
name: Generate Release List
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Release Directory
run: mkdir release-data
shell: bash
- name: Github release data
uses: KevinRohn/github-full-release-data@v2.0.4
with:
version: "nightlies"
asset-file: "*.zip,*.tar.gz"
asset-output: "./release-data/"
- name: Generate releases.csv
run: |
.github/scripts/generate-releases-csv.py
- name: Upload releases.*
uses: svenstaro/upload-release-action@v2
with:
file: release-data/releases.*
tag: nightlies
overwrite: true
file_glob: true

create-issue-on-fail:
name: "Create Issue on Failure"
permissions:
Expand Down

0 comments on commit b811a4d

Please sign in to comment.