Merge pull request #561 from 18F/remove-hug-bot #77
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: push to main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
uses: ./.github/workflows/reusable_build.yml | |
test: | |
needs: [build] | |
uses: ./.github/workflows/reusable_test.yml | |
deploy: | |
needs: [test] | |
uses: ./.github/workflows/reusable_deploy.yml | |
with: | |
environment: prod | |
secrets: inherit | |
release: | |
name: publish release | |
needs: [deploy] | |
runs-on: ubuntu-latest | |
container: node:22 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ./node_modules | |
key: 18f-bot-${{ runner.os }}-${{ hashFiles('package.json') }}-v1 | |
- uses: actions/cache@v3 | |
id: npmcache | |
with: | |
path: ./npm-cache | |
key: 18f-bot-${{ runner.os }}-npmcache-${{ hashFiles('package.json') }}-v1 | |
- name: get current time | |
id: time | |
run: | | |
echo "::set-output name=time::$(date +%Y-%m-%d_%H-%M-%S)" | |
echo "::set-output name=human::$(date '+%Y-%m-%d, %H:%M:%S')" | |
- name: zip bundle | |
uses: byteever/action-build-zip@e42976f29f487a742e0e65aee89375e23f080ada | |
id: zip | |
- name: compute zip hash | |
id: hash | |
run: | | |
echo "::set-output name=sha::$(shasum -a 256 ${{ steps.zip.outputs.zip_path }} | cut -d' ' -f1)" | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ steps.zip.outputs.zip_path }} | |
name: ${{ steps.time.outputs.human }} | |
body: | | |
Bundle hash (SHA256): ${{ steps.hash.outputs.sha }} | |
generate_release_notes: true | |
tag_name: ${{ steps.time.outputs.time }} |