diff --git a/.github/workflows/test-and-release.yaml b/.github/workflows/test-and-release.yaml index ca4cc20..8fd2464 100644 --- a/.github/workflows/test-and-release.yaml +++ b/.github/workflows/test-and-release.yaml @@ -41,3 +41,17 @@ jobs: run: | npm i --no-save semantic-release npx semantic-release + - name: Publish latest release to GitHub + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "machine github.com login authtoken password ${GITHUB_TOKEN}" > ~/.netrc + git config user.email "actions@example.com" + git config user.name "GitHub Actions" + cd dist + git init + git add main.js + git add chatbutton.js + git commit -m 'latest release' + git remote add origin https://github.com/${GITHUB_REPOSITORY}.git + git push -f origin HEAD:gh-pages