mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
test: use git describe
This commit is contained in:
@@ -16,13 +16,11 @@ jobs:
|
||||
- uses: denoland/setup-deno@main
|
||||
with:
|
||||
deno-version: ${{ matrix.deno }}
|
||||
# Taken from: https://github.com/denoland/dnt#github-actions---npm-publish-on-tag
|
||||
- name: Get tag version
|
||||
id: get_tag_version
|
||||
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
|
||||
- name: Get last tag version
|
||||
run: echo "DISCORDENO_VERSION_OLD=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||
- name: Get new tag version
|
||||
run: echo "DISCORDENO_VERSION=$(cat util/constants.ts | grep 'export const DISCORDENO_VERSION' | awk -F'= ' '{print $2}' | tr -d '"|;')" >> $GITHUB_ENV
|
||||
- name: Create tag
|
||||
if: ${{ env.DISCORDENO_VERSION != steps.get_tag_version.outputs.TAG_VERSION }}
|
||||
if: ${{ env.DISCORDENO_VERSION != env.DISCORDENO_VERSION_OLD }}
|
||||
run: git tag ${{ env.DISCORDENO_VERSION }} && git push --tags
|
||||
|
||||
|
||||
Reference in New Issue
Block a user