Skip to content

Commit

Permalink
ci: add release workflow (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
picopock committed Apr 14, 2023
1 parent b9a579f commit d1181d7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 41 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/build.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: release

on:
push:
tags:
- "v*.*.*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node Version 18
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install And Build
run: |
yarn --frozen-lockfile
yarn build
- name: Get Version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: Package files
run: |
mv ./build ./navigation-website-${{ steps.get_version.outputs.VERSION }}
tar -zcvf navigation-website-${{ steps.get_version.outputs.VERSION }}.tar.gz ./navigation-website-${{ steps.get_version.outputs.VERSION }}
zip -r navigation-website-${{ steps.get_version.outputs.VERSION }}.zip ./navigation-website-${{ steps.get_version.outputs.VERSION }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./navigation-website-*
draft: false

0 comments on commit d1181d7

Please sign in to comment.