Skip to content

Commit

Permalink
build: Updated the release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
shichen85 committed May 13, 2024
1 parent e48f7a6 commit 9493be3
Show file tree
Hide file tree
Showing 3 changed files with 599 additions and 1,847 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,41 @@ name: Create release

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

env:
ARTIFACT_NAME: Olympus.yymps
CHANGELOG_NAME: CHANGELOG.md

permissions:
contents: write
pull-requests: write


jobs:
release:
runs-on: 'ubuntu-latest'
name: Create a release
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: google-github-actions/release-please-action@v4
id: release
with:
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: node
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.release_created }}
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm install
- name: Create the artifact
run: npx yymps-export
- name: Upload artifact to release
uses: softprops/action-gh-release@v1
with:
files: ${{env.ARTIFACT_NAME}}
body_path: ${{ env.CHANGELOG_NAME}}
draft: true

- run: npm install && npx yymps-export
if: ${{ steps.release.outputs.release_created }}
- name: Upload Release Artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ${{env.ARTIFACT_NAME}}
Loading

0 comments on commit 9493be3

Please sign in to comment.