Skip to content

fix: use github.token to debug the sem-release issue (#32) #5

fix: use github.token to debug the sem-release issue (#32)

fix: use github.token to debug the sem-release issue (#32) #5

Workflow file for this run

name: Release CI
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: semantic release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
# Run in dry-run mode to determine the next tag version and store it in semantic-release-next-version.txt
npx [email protected] --dry-run | tee semantic-release-dry-run-output.txt
cat semantic-release-dry-run-output.txt \
| grep -o 'Skip v.* tag creation in dry-run mode' \
| sed -e 's/^Skip //' | sed -e 's/ tag creation in dry-run mode$//' \
| tee semantic-release-next-version.txt
echo "DEBUG: Next version is '$(cat semantic-release-next-version.txt)'" # Debug version number
# Hardcode the next tag version in the atlas script
sed -i -e "s/_ATLAS_VERSION=.*/_ATLAS_VERSION=\"$(cat semantic-release-next-version.txt)\" # Tagged by release.yml/" atlas
# Actually create the tag and upload the atlas script
npx [email protected]