Merge pull request #29 from amplience/feature/MAN-1684-pass-org-id-th… #47
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
name: Release | |
on: [push] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | |
permissions: | |
# Needed to create PR statuses/checks | |
checks: write | |
statuses: write | |
# Needed to push git tags, release | |
contents: write | |
# Needed to push packages and write CHANGELOG | |
packages: write | |
issues: read | |
# Needed to write back to PR to include build info | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare repository | |
# Fetch full git history and tags | |
run: git fetch --unshallow --tags | |
- name: Unset header | |
run: | | |
git config --local --unset http.https://github.com/.extraheader | |
git config --global user.name "Amp Automation" | |
git config --global user.email "68329326+amp-automation@users.noreply.github.com" | |
- name: Use NVM Node.js version | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
registry-url: 'https://npm.pkg.github.com' | |
scope: "@amplience" | |
- name: Create Release | |
env: | |
# environmental vars for actions/setup-node, should use same GH token for both GH_TOKEN and NPM_TOKEN | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# This token is scoped to public repo's and has read|write on actions|contents|PR and issues|metadata readonly | |
# It is specifically required to allow commits back to this repository as part of `auto shipit` | |
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.GH_PUBLIC_REPO_CONTENTS_ACCESS }} | |
# this project is configured to use the auto-shipit/conventional-commits plugin | |
run: | | |
npm install --frozen-lockfile | |
npm run build | |
npx auto shipit |