Files
discordeno/.github/workflows/release.yml
2022-02-25 18:52:34 +00:00

28 lines
900 B
YAML

name: Release
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
deno: ["v1.x"]
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@main
with:
deno-version: ${{ matrix.deno }}
- name: Get last tag version
run: |
echo "DISCORDENO_VERSION_OLD=$(wget -O- -q https://deno.land/x/discordeno/util/constants.ts | grep 'export const DISCORDENO_VERSION' | awk -F'= ' '{print $2}' | tr -d '"|;')" >> $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 != env.DISCORDENO_VERSION_OLD }}
run: git tag ${{ env.DISCORDENO_VERSION }} && git push --tags