@@ -1,41 +1,19 @@
|
||||
name: Build and Release
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: latest
|
||||
- name: Prepare
|
||||
run: npm ci
|
||||
- name: Test
|
||||
run: npm test
|
||||
- name: Build
|
||||
run: npm pack
|
||||
- name: Rename release file
|
||||
run: mv workerless*.tgz workerless.tgz
|
||||
- name: Generate release notes
|
||||
run: git log $(git describe --tags --abbrev=0 HEAD~1)..HEAD --oneline > changelog.txt
|
||||
- name: Github Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
make_latest: true
|
||||
body_path: changelog.txt
|
||||
files: workerless.tgz
|
||||
- name: NPM Release
|
||||
run: npm publish
|
||||
- uses: actions/checkout@v5
|
||||
- run: npm ci
|
||||
- run: npm version from-git --allow-same-version --no-git-tag-version
|
||||
- run: npm config set registry https://gitea.sugoidogo.com/api/packages/sugoidogo/npm/
|
||||
- run: npm config set -- '//gitea.sugoidogo.com/api/packages/sugoidogo/npm/:_authToken' "$PACKAGES_KEY"
|
||||
env:
|
||||
PACKAGES_KEY: ${{ secrets.PACKAGES_KEY }}
|
||||
- run: npm publish
|
||||
|
||||
Reference in New Issue
Block a user