diff --git a/.github/workflows/prodtag.yml b/.github/workflows/prodtag.yml index 802af59..0df41be 100644 --- a/.github/workflows/prodtag.yml +++ b/.github/workflows/prodtag.yml @@ -1,4 +1,4 @@ -name: Auto-create tag on every push to `production` +name: Auto-create tag/release on every push to `production` on: push: @@ -8,9 +8,20 @@ on: jobs: tag: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 with: ref: production - run: git tag "`date +%Y.%m.%d`.`git rev-parse --short HEAD`" $(git rev-parse HEAD) - run: git push --tags + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm ci && npm run build + - run: cd dist && zip -r ../phanpy-dist.zip . && cd .. + - uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true + files: phanpy-dist.zip diff --git a/.github/workflows/tagrelease.yml b/.github/workflows/tagrelease.yml deleted file mode 100644 index 30198a2..0000000 --- a/.github/workflows/tagrelease.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Create Release on every tag push in `production` - -on: - push: - tags: - - '*' - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - with: - ref: production - - uses: actions/setup-node@v3 - with: - node-version: 18 - - run: npm ci && npm run build - - run: cd dist && zip -r ../phanpy-dist.zip . && cd .. - - uses: softprops/action-gh-release@v1 - with: - generate_release_notes: true - files: phanpy-dist.zip