docs: update release flow readme #22
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
on: | |
push: | |
branches: | |
- 'main' | |
name: Build | |
jobs: | |
build: | |
permissions: | |
contents: write | |
name: docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run pre-build | |
- run: npm run build | |
- run: npm run post-build | |
- run: echo "DATE=$(date -Im | sed 's|:|_|g' | sed 's|+|__|g')" >> $GITHUB_ENV | |
- run: echo "DATE_RELEASE=$(date -Im)" >> $GITHUB_ENV | |
- uses: thedoctor0/[email protected] | |
with: | |
type: zip | |
filename: docs_${{ env.DATE }}.zip | |
directory: build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: docs_${{ env.DATE }} | |
path: build/docs_${{ env.DATE }}.zip | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'build/docs_${{ env.DATE }}.zip' | |
name: ${{ env.DATE_RELEASE }} | |
tag: ${{ env.DATE }} |