Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

echo "::set-env name=TAG::${GITHUB_REF#refs/tags/}"

- name: Create, or update the short-name branch
if: startsWith(env.TAG, 'v0.0') != true
if: startsWith(github.ref_name, 'v0.0') != true
run: |
SHORT="$(echo "${TAG#v}" | cut -d. -f-2)"
SHORT="$(echo "${GITHUB_REF_NAME#v}" | cut -d. -f-2)"

git branch -f "$SHORT" "$TAG"
git branch -f "$SHORT" "$GITHUB_REF_NAME"

git push --force \
"https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" \
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ steps:
...
- name: Set enviroment for github-release
run: |
echo ::set-env name=RELEASE_TAG::"v1.0.0"
echo ::set-env name=RELEASE_NAME::"$GITHUB_WORKFLOW"
echo "RELEASE_TAG=v1.0.0" >> $GITHUB_ENV
echo "RELEASE_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV

- uses: meeDamian/github-release@2.0
with:
Expand All @@ -79,9 +79,9 @@ steps:
...
```

To learn more about notation used above see [this].
To learn more about the use of `GITHUB_ENV` above see [this].

[this]: https://help.github.com/en/articles/development-tools-for-github-actions#set-an-environment-variable-set-env
[this]: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable


#### Files syntax
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fi
release_id="$(jq '.id' < "$TMP/$method.json")"

# Make release ID available to other steps in user's workflow
echo "::set-output name=release_id::$release_id"
echo "release_id=$release_id" >> $GITHUB_OUTPUT
echo "::endgroup::"

#
Expand Down