marp-team / actions

Common GitHub Actions and scripts for Marp team projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

marp-team/actions

Common GitHub Actions and scripts for Marp team projects.

jobs:
  something:
    steps:
      - uses: marp-team/actions@v1
        with:
          task: release
          token: ${{ secrets.GITHUB_TOKEN }}

Please note that provided actions are only for Marp team projects.

Pass the name of task to task parameter in with key of the step.

release: Update GitHub Release

Update GitHub Release for the tagged version based on parsed contents from CHANGELOG.md.

on:
  push:
    tags:
      - v*

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: marp-team/actions@v1
        with:
          task: release
          token: ${{ secrets.GITHUB_TOKEN }}

Inputs

  • task (required): Must be release.
  • token (required): GitHub token.
  • preRelease (optional): Mark or not the release as pre-release. If not defined, detect the right value automatically from the version, by following Marp project guideline.

upload: Upload assets to existing GitHub Release

Upload files to existing GitHub release for specified version.

on:
  push:
    tags:
      - v*

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: marp-team/actions@v1
        with:
          task: upload
          token: ${{ secrets.GITHUB_TOKEN }}
          files: dist,pkg/xxxxxxxx.zip

Inputs

  • task (required): Must be upload.
  • token (required): GitHub token.
  • files (required): Comma-separated string for upload files or directories.

npm version helper script

This repository also provides a helper script of npm version for including update of CHANGELOG.md to bumped commit.

// package.json
{
  "scripts": {
    "version": "curl https://raw.githubusercontent.com/marp-team/actions/v1/lib/scripts/version.js | node && git add -A CHANGELOG.md"
  }
}

Development

We are following the contributing guideline of marp-team projects. Please read these guidelines this before starting work in this repository.

Release

$ npm version [major|minor|patch]
$ git push && git push --tag

vX.X.X-release tag for production use will create automatically when pushed a semantic versioning tag such as vX.X.X. It includes compiled JS scripts and dependent modules for production.

In addition, the primary version tag such as v1 will move to the created commit by updated release tag when the pushed tag has no identifiers for prerelease.

Author

Managed by @marp-team.

License

MIT License

About

Common GitHub Actions and scripts for Marp team projects

License:MIT License


Languages

Language:TypeScript 96.2%Language:JavaScript 3.8%