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 c146e32
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 929 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
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release new version
on:
push:
tags:
- v*.*.*

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.ref }}
fetch-depth: 0 # fetch full history for Git tests

- 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: teunmooij/github-versioned-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
include: |
dist/licenses.txt
dist/index.js
README.md
action.yml
- name: Create release
uses: softprops/action-gh-release@v1
with:
draft: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ Thumbs.db
# Ignore built ts files
__tests__/runner/*
lib/**/*
dist/*
9 changes: 0 additions & 9 deletions dist/index.js

This file was deleted.

Loading

0 comments on commit c146e32

Please sign in to comment.