What did I even do

bottom text
This commit is contained in:
Pk11
2020-09-17 19:00:24 -05:00
parent ede44c2ee7
commit 2068c7a314
+4 -3
View File
@@ -16,10 +16,10 @@ jobs:
outputs:
commit_tag: ${{ steps.build.outputs.commit_tag }}
commit_hash: ${{ steps.build.outputs.commit_hash }}
commit_message: ${{ steps.build.outputs.commit_message }}
author_name: ${{ steps.build.outputs.author_name }}
committer_name: ${{ steps.build.outputs.committer_name }}
commit_subject: ${{ steps.build.outputs.commit_subject }}
commit_message: ${{ steps.build.outputs.commit_message }}
steps:
- name: Checkout repo
uses: actions/checkout@v1
@@ -49,11 +49,11 @@ jobs:
cp Universal-Updater.cia ~/artifacts
echo ::set-output name=commit_tag::$(git describe --abbrev=0 --tags)
echo ::set-output name=commit_hash::$(git log --format=%h -1)
echo ::set-output name=commit_message::$(git log --pretty=format:"%an - %s" -1)
# Webhook info
echo ::set-output name=author_name::$(git log -1 "$GITHUB_SHA" --pretty="%aN")
echo ::set-output name=committer_name::$(git log -1 "$GITHUB_SHA" --pretty="%cN")
echo ::set-output name=commit_subject::$(git log -1 "$GITHUB_SHA" --pretty="%s")
echo ::set-output name=commit_message::$(git log -1 "$GITHUB_SHA" --pretty="%b")
- name: Publish build to GH Actions
uses: actions/upload-artifact@v2
@@ -70,6 +70,7 @@ jobs:
env:
COMMIT_TAG: ${{ needs.build.outputs.commit_tag }}
COMMIT_HASH: ${{ needs.build.outputs.commit_hash }}
AUTHOR_NAME: ${{ needs.build.outputs.author_name }}
COMMIT_MESSAGE: ${{ needs.build.outputs.commit_message }}
outputs:
current_date: ${{ steps.commit.outputs.current_date }}
@@ -121,7 +122,7 @@ jobs:
AUTH_HEADER="Authorization: token ${{ secrets.TWLBOT_TOKEN }}"
CONTENT_TYPE="Content-Type: application/json"
API_URL="https://api.github.com/repos/Universal-Team/extras/releases"
RELEASE_INFO="{\"tag_name\": \"v${{ steps.commit.outputs.current_date }}\", \"name\": \"Universal-Updater | $COMMIT_HASH\", \"body\": \"$COMMIT_MESSAGE\", \"prerelease\": true}"
RELEASE_INFO="{\"tag_name\": \"v${{ steps.commit.outputs.current_date }}\", \"name\": \"Universal-Updater | $COMMIT_HASH\", \"body\": \"$AUTHOR_NAME - $COMMIT_MESSAGE\", \"prerelease\": true}"
RESPONSE=$(curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_TYPE" "$API_URL" -d "$RELEASE_INFO")