Skip to content

Release

Release #86

Workflow file for this run

name: Release
on: workflow_dispatch
# Necessary to deploy to AWS using OIDC
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
permissions:
id-token: write # This is required for requesting the JWT
# To allow creating the GitHub release
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# So that we can create git commits
fetch-depth: 0
# Set git credentials (https://github.com/actions/checkout/issues/13#issuecomment-724415212)
- name: Set Git credentials
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::534081306603:role/bref-layer-js-github-actions
role-session-name: bref-layer-js-github-actions
aws-region: us-east-1
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm run update
- run: git commit -am "Update layer versions"
- name: Bump the version
run: npm version patch
- name: Push the new commit and git tag
run: git push origin && git push origin --tags
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Retrieve the new NPM version
id: npm-version
uses: martinbeentjes/npm-get-version-action@main
- name: Create a GitHub release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{steps.npm-version.outputs.current-version}}