diff --git a/.github/workflows/ipfs-deploy.yml b/.github/workflows/ipfs-deploy.yml index 097c4863..7803ee9d 100644 --- a/.github/workflows/ipfs-deploy.yml +++ b/.github/workflows/ipfs-deploy.yml @@ -65,3 +65,73 @@ jobs: - name: Publish to nft.storage run: | docker run -e NFTSTORAGE_API_KEY=${{ secrets.NFTSTORAGE_API_KEY }} $IMAGE_RELEASE_ID nft.storage + + - name: Create a reference for IPFS hash + if: github.ref_type == 'tag' + run: | + echo "IPFS_HASH=$(docker run --entrypoint /bin/sh $IMAGE_RELEASE_ID -c 'cat /ipfs_hash.txt')" >> $GITHUB_ENV + + - name: Create a release + if: github.ref_type == 'tag' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Markdown template for the release notes + RELEASE_NOTE_TEMPLATE=$(cat << EOF + #### IPFS Hash + + \`\`\` + $IPFS_HASH + \`\`\` + + You can view published versions of Lunaria through any IPFS Gateway + + [ipfs://$IPFS_HASH](ipfs://$IPFS_HASH) __(Recommended)__ + _requires Brave Browser or IPFS Desktop_ + [https://$IPFS_HASH.ipfs.nftstorage.link](https://$IPFS_HASH.ipfs.nftstorage.link) + [https://$IPFS_HASH.ipfs.zoltu.io](https://$IPFS_HASH.ipfs.zoltu.io) + [https://$IPFS_HASH.ipfs.keydonix.com](https://$IPFS_HASH.ipfs.keydonix.com) + [https://$IPFS_HASH.ipfs.cf-ipfs.com](https://$IPFS_HASH.ipfs.cf-ipfs.com) + [https://$IPFS_HASH.ipfs.w3s.link](https://$IPFS_HASH.ipfs.w3s.link) + EOF + ) + + # Generate payload for creating a new release + PAYLOAD_TEMPLATE=$(cat <