Change collection stats links, update deps (#1160) #584
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: Release-Dev-Auto | |
on: | |
push: | |
branches: master | |
jobs: | |
release-dev-auto: | |
runs-on: ubuntu-latest | |
environment: production | |
name: Build & release dev version | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Determine bump type | |
uses: zwaldowski/match-label-action@v5 | |
id: bump | |
with: | |
allowed: premajor,preminor,prepatch | |
default_match: prerelease | |
- name: Get new version | |
uses: zwaldowski/semver-release-action@v4 | |
id: semver | |
with: | |
bump: ${{ steps.bump.outputs.match }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
dry_run: true | |
preid: 'dev' | |
- name: Update version in package.json | |
run: pnpm version ${{ steps.semver.outputs.version_tag }} --no-git-tag-version | |
- name: Build | |
run: pnpm build | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
- name: Create changelog | |
run: | | |
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"* %B" > changelog.txt | |
echo 'CHANGELOG<<CHANGELOG_END' >> $GITHUB_ENV | |
cat changelog.txt >> $GITHUB_ENV | |
echo -e '\nCHANGELOG_END' >> $GITHUB_ENV | |
- name: Create build.zip | |
run: zip -r ../build/Shoko-WebUI-v${{ steps.semver.outputs.version_tag }}.zip ./* -x "**/*.js.map" | |
working-directory: ./dist | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./build/Shoko-WebUI-v${{ steps.semver.outputs.version_tag }}.zip | |
tag_name: v${{ steps.semver.outputs.version_tag }} | |
prerelease: true | |
fail_on_unmatched_files: true | |
body_path: ./changelog.txt | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get current datetime | |
id: date | |
run: echo "date=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT | |
- name: Notify discord | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.DISCORD_WEBHOOK }} | |
embed-color: 7641851 | |
embed-timestamp: ${{ steps.date.outputs.date }} | |
embed-author-name: Web UI | New Daily Build | |
embed-author-icon-url: https://raw.githubusercontent.com/${{ github.repository }}/master/.github/images/webui.png | |
embed-author-url: https://github.com/${{ github.repository }} | |
embed-description: | | |
**Version**: `${{ steps.semver.outputs.version_tag }}` | |
Update from the Web UI or click [here](https://github.com/${{ github.repository }}/releases/tag/v${{ steps.semver.outputs.version_tag }}) to download! | |
**Changes since last build**: | |
${{ env.CHANGELOG }} |