wip #6
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
# This workflow is triggered on pushes to the master branch and creates a release | |
# with the "latest" tag. it also removes any previous associated releases. | |
--- | |
name: "release" | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
# Shallow clones should be disabled to generate the release tag | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Build | |
run: | | |
npm install | |
gulp generic | |
- name: Commit build | |
run: | | |
git add -f build | |
git commit -m "Add build" | |
git push origin master | |
- name: Create Release | |
run: tar czf build.tar.gz -C build . | |
- name: Create version tag | |
run: | | |
TAG="$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)" | |
echo "TAG=$TAG" >> $GITHUB_ENV | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build.tar.gz" | |
tag: ${{ env.TAG }} |