Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
135e9777fa |
@@ -59,7 +59,26 @@ jobs:
|
|||||||
(cd target/dist && rm -f "${name}.zip" && zip -r9 "${name}.zip" "$name")
|
(cd target/dist && rm -f "${name}.zip" && zip -r9 "${name}.zip" "$name")
|
||||||
echo "name=${name}" >> "$GITHUB_OUTPUT"
|
echo "name=${name}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
echo "version=${version}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.package.outputs.name }}
|
name: ${{ steps.package.outputs.name }}
|
||||||
path: target/dist/${{ steps.package.outputs.name }}.zip
|
path: target/dist/${{ steps.package.outputs.name }}.zip
|
||||||
|
|
||||||
|
- name: Check tag matches crate version
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: |
|
||||||
|
if [ "${GITHUB_REF_NAME}" != "v${{ steps.package.outputs.version }}" ]; then
|
||||||
|
echo "Tag ${GITHUB_REF_NAME} does not match crate version v${{ steps.package.outputs.version }}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Publish release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
name: ${{ github.ref_name }}
|
||||||
|
files: target/dist/${{ steps.package.outputs.name }}.zip
|
||||||
|
sha256sum: true
|
||||||
Reference in new issue
Block a user