Skip to content

Merge pull request #86 from ejhayes/optional-content-header #29

Merge pull request #86 from ejhayes/optional-content-header

Merge pull request #86 from ejhayes/optional-content-header #29

Workflow file for this run

on:
push:
branches:
- main
- next
jobs:
release:
runs-on: ubuntu-latest
steps:
- if: runner.debug == 1
run: |
set
cat $GITHUB_EVENT_PATH
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- name: Prepare repository
run: git fetch --unshallow --tags
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/cache@v3
with:
path: ./node_modules
key: modules-${{ hashFiles('package-lock.json') }}
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
npm ci
npm run ci:build
npx auto shipit
- name: Publish Action
run: |
RELEASE_NAME=releases/$(git describe --tags --abbrev=0 | cut -d- -f2 | cut -d. -f1)
npx action-docs -u
npm prune --production
git checkout --orphan $RELEASE_NAME
git rm -f --cached -r .
git add -f .github/workflows/tag_next.yml fixtures dist/index.js dist/index.js.map dist/sourcemap-register.js action.yml README.md CHANGELOG.md package-lock.json LICENSE
git clean -fdx
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Release created from $GITHUB_SHA"
git push origin -f $RELEASE_NAME