Trying to set a shorter SHA #5
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: Build & Publish Extension | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
build-retool-embedder: | |
name: "Build, Bundle, Release" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set short git commit SHA | |
id: vars | |
run: | | |
calculatedSha=$(git rev-parse --short ${{ github.sha }}) | |
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV | |
- name: Confirm git commit SHA output | |
run: "echo 'SHORT HASH=${{ env.COMMIT_SHORT_SHA }}'" | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Build Extension | |
run: |- | |
npm ci | |
npm run build | |
zip -r retool-embedder-${{ env.COMMIT_SHORT_SHA }}.zip build | |
- name: Archive retool-embedder Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: retool-embedder-${{ env.COMMIT_SHORT_SHA }} | |
path: retool-embedder-${{ env.COMMIT_SHORT_SHA }}.zip | |
- name: Archive retool-embedder Artifact | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: "ci-${{ env.COMMIT_SHORT_SHA }}" | |
commit: "main" | |
artifacts: "retool-embedder-${{ env.COMMIT_SHORT_SHA }}.zip" | |
body: "# Retool Embedder CI Build\n## retool-embedder-${{ env.COMMIT_SHORT_SHA }}.zip" |