Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/web-infra-dev/actions
https://github.com/web-infra-dev/actions
actions github-actions
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/web-infra-dev/actions
- Owner: web-infra-dev
- Created: 2021-11-03T02:15:57.000Z (about 3 years ago)
- Default Branch: v2
- Last Pushed: 2023-09-14T06:25:06.000Z (over 1 year ago)
- Last Synced: 2024-03-15T04:21:36.924Z (10 months ago)
- Topics: actions, github-actions
- Language: TypeScript
- Size: 8.41 MB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Modern.js Actions
## Introduce
This Action containers two actions for [Modern.js](https://modernjs.dev/):
- Create a pull request with all of the package versions updated and changelogs updated
- Release packages to [NPM](https://www.npmjs.com/) and create Release to repo
## Usage
### Release Pull Request
#### Inputs
- type: action type. Used to distinguish action execution action. Here is 'pull request'
- version: release type. Support 'latest', 'canary', 'alpha', 'pre'
- versionNumber: release version. Support like 'v1.x.x' or 'auto'. When you use auto, this action will get the first packages version after running bump version.#### REPO_SCOPED_TOKEN
This action need to set REPO_SCOPED_TOKEN. You can read [Creating a personal access token](https://docs.github.com/cn/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to create presonal access token.
#### Outputs
Create Release Request for repository.
#### Example
```
name: Release Pull Requeston:
workflow_dispatch:
inputs:
version:
type: choice
description: 'Release Type(canary, alpha, pre, latest)'
required: true
default: 'latest'
options:
- canary
- alpha
- pre
- latestjobs:
release:
name: Create Release Pull Request
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch only one branch to release
fetch-depth: 100- name: Create Release Pull Request
uses: web-infra-dev/actions@main
with:
# this expects you to have a script called release which does a build for your packages and calls changeset publish
version: ${{ github.event.inputs.version }}
versionNumber: 'auto'
type: 'pull request'
env:
GITHUB_TOKEN: ${{ secrets.REPO_SCOPED_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}
```### Release
#### Inputs
- type: action type. Used to distinguish action execution action. Here is 'relesae'
- version: release type. Support 'latest', 'canary', 'alpha', 'pre'
- branch: release branch#### REPO_SCOPED_TOKEN
This action need to set REPO_SCOPED_TOKEN. You can read [Creating a personal access token](https://docs.github.com/cn/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to create presonal access token.
#### Outputs
Runtime Modern Release to publish packages to NPM
#### Example
```
name: Releaseon:
workflow_dispatch:
inputs:
version:
type: choice
description: 'Release Version(canary, alpha, pre, latest)'
required: true
default: 'canary'
options:
- canary
- alpha
- pre
- latest
branch:
description: 'Release Branch(confirm release branch)'
required: true
default: 'main'jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
# This makes Actions fetch only one branch to release
fetch-depth: 1- name: Release
uses: web-infra-dev/actions@main
with:
# this expects you to have a script called release which does a build for your packages and calls changeset publish
version: ${{ github.event.inputs.version }}
branch: ${{ github.event.inputs.branch }}
type: 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}```