Skip to content

Commit

Permalink
ci(build): trigger on tags instead
Browse files Browse the repository at this point in the history
  • Loading branch information
PalmDevs committed Sep 14, 2024
1 parent 421c50b commit a9371c1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Build
on:
push:
branches: [main, dev]
paths-ignore:
- "**/*.md"
tags:
- "v*"

jobs:
build:
Expand All @@ -16,6 +15,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set env
id: env
run: |
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "hash=$GITHUB_SHA" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v4
with:
node-version: 20
Expand All @@ -27,21 +32,15 @@ jobs:
- name: Build
run: pnpm build --release-branch=${{ github.ref_name }} --build-minify

# TODO: Check for linting?

- name: Get file hash
id: hash
run: echo "hash=$GITHUB_SHA" >> "$GITHUB_OUTPUT"

- name: Create draft release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.hash.outputs.hash }}
release_name: Revenge ${{ steps.hash.outputs.hash }}
tag_name: ${{ steps.env.outputs.tag }}
release_name: Revenge ${{ steps.env.outputs.tag }}
draft: true
prerelease: false

Expand Down

0 comments on commit a9371c1

Please sign in to comment.