Skip to content

Release

Release #32

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
build_and_release:
name: Build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # fetch full history, so changelog can be generated
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: yarn install --immutable
- run: yarn run build
- run: yarn run lint
- run: yarn run test
- run: yarn run test-types
- name: git config
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Create release
id: create_release
run: |
yarn run release
echo ::set-output name=tag_name::$(git describe HEAD --abbrev=0)
- run: yarn run docs
- name: commit docs website
run: |
git add docs
git diff-index --quiet HEAD || git commit -m 'docs: update docs website'
- name: copy README and LICENSE to packages
run: |
cp README.md packages/aws-sdk-client-mock/README.md
cp LICENSE packages/aws-sdk-client-mock/
cp LICENSE packages/aws-sdk-client-mock-jest/
- name: run e2e tests
run: |
yarn run verdaccio &
yarn run local-publish
yarn run test-e2e
- run: yarn run publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
- name: Generate Release body
run: npx extract-changelog-release > RELEASE_BODY.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.create_release.outputs.tag_name }}
body_path: RELEASE_BODY.md