copy-release-assets.yml 635 B

12345678910111213141516171819202122232425262728293031
  1. name: Copy assets to the new release
  2. on:
  3. release:
  4. types: published
  5. permissions:
  6. contents: write
  7. env:
  8. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  9. jobs:
  10. release:
  11. name: Copy assets to the new release
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v4
  15. with:
  16. fetch-depth: 0
  17. - name: Download and upload
  18. run: |
  19. LATEST="$(git describe --tags --abbrev=0)"
  20. PREVIOUS="$(git describe --tags --abbrev=0 "$LATEST"^)"
  21. mkdir release-assets && cd release-assets
  22. gh release download "$PREVIOUS"
  23. gh release upload "$LATEST" -- *