Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/erri120/rpgmpacker
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Nov 18, 2021
2 parents 3922285 + aeb6e46 commit 0088032
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Get version from input
id: tag_name
shell: bash
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
run: |
echo ::set-output name=current_version::${INPUT_VERSION}
- uses: pnpm/[email protected]
with:
version: 6.20.2
- name: Use Node.js 16.13.0
uses: actions/setup-node@v2
with:
node-version: 16.13.0
cache: 'pnpm'

- name: Install dependencies
run: pnpm install
- name: Run build
run: pnpm run build
- name: Run tests
run: pnpm run test

- name: Pack
run: pnpm pack
- name: Publish
run: pnpm publish rpgmpacker-${{ steps.tag_name.outputs.current_version }}.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ steps.changelog_reader.outputs.version }}
name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
files: |
rpgmpacker-*.tgz

0 comments on commit 0088032

Please sign in to comment.