Skip to content

Commit

Permalink
CI: Release on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Property404 committed Nov 9, 2024
1 parent 49565db commit c52e188
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
name: Release CI

on: [push]
on:

Check warning on line 4 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / build

4:1 [truthy] truthy value should be one of [false, true]

Check warning on line 4 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / build

4:1 [truthy] truthy value should be one of [false, true]
branches: main
tags:
- '*'

jobs:
build:
Expand All @@ -17,8 +21,27 @@ jobs:
npm install
npm run build
popd
- name: Archive artifacts
uses: actions/upload-artifact@v4
- name: Tar dist
run: tar czf its-a-unix-system.tar.gz dist/
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
id: create_release
with:
name: iaus-release
path: www/dist
draft: true
prerelease: true
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
body: Look at me I'm a release haha
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./its-a-unix-system.tar.gz
asset_name: its-a-unix-system.tar.gz
asset_content_type: application/gzip

0 comments on commit c52e188

Please sign in to comment.