Skip to content

Commit

Permalink
Automate release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
usimd committed Nov 13, 2023
1 parent 5adefd2 commit 89ebe18
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 928 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Compile action code before test
run: npm ci && npm run package

- name: Run pi-gen build
uses: ./
id: build
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release new version
on:
push:
tags:
- v*.*.*

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.ref }}

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Compile and create dist files
run: npm ci && npm run all

- name: Push dist to new tag
uses: mheap/build-and-tag-action@add-additional-files
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref_name }}
additional_files: 'dist/licenses.txt,README.md'

- name: Create release
uses: softprops/action-gh-release@v1
with:
draft: true
9 changes: 0 additions & 9 deletions dist/index.js

This file was deleted.

Loading

0 comments on commit 89ebe18

Please sign in to comment.