diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000000..ad06f0477c1148 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +# 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 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: latest + - name: Build + run: | + npm install + gulp generic + - name: Create Release + run: tar czf build.tar.gz -C build . + - name: Create version tag. the tag is in format of v4-{number of commits}-{last commit id} + run: | + TAG="$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)" + echo "TAG=$TAG" >> $GITHUB_ENV + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: ${{ env.TAG }} + files: "build.tar.gz"