-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: replace travis by github actions
- Loading branch information
Showing
5 changed files
with
110 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Serverless Migrate Plugin CI | ||
|
||
on: | ||
push: | ||
branches: [ feature/update-readme-custom-migrate ] | ||
pull_request: | ||
branches: [ feature/update-readme-custom-migrate ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Install dependencies for CI | ||
run: npm ci | ||
|
||
- name: Link package | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/example | ||
npm link serverless-migrate-plugin | ||
- name: Build and test | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/example | ||
npm run create | ||
npm run up | ||
npm run down | ||
npm run list | ||
echo It is all good man! | ||
cd - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release new version of Serverless Migrate Plugin | ||
|
||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm publish --provenance --access public |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
Serverless plugin for migrate | ||
============================== | ||
[](https://badge.fury.io/js/serverless-migrate-plugin) | ||
|
||
This is a plugin for the [Serverless][serverless-web] framework that allows you to manage and run database-agnostic | ||
migrations. To do so, it works on top of [migrate][migrate-npm]. | ||
|
||
## How to release | ||
The release will be triggered by the presence of a tag and a version bump. This is made as follows | ||
|
||
1. Generate the new version | ||
```bash | ||
npm version major | ||
``` | ||
or | ||
|
||
```bash | ||
npm version minor | ||
``` | ||
|
||
or | ||
|
||
```bash | ||
npm version minor | ||
``` | ||
|
||
or just specify the whole version (beware of not repeating it) | ||
|
||
```bash | ||
npm version <version, e.g. 3.1.2> | ||
``` | ||
This will generate a version and a tag | ||
|
||
1. Push the commit with the correspoding tag and that will trigger the release | ||
|
||
```bash | ||
git push origin --tags | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters