Skip to content

Commit

Permalink
chore: close milestone on actual release
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jan 22, 2023
1 parent bd9af7d commit 8aeb36c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/close-milestone.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
name: close-milestone
run-name: Close milestone ${{ github.ref_name }}

on:
milestone:
types: [closed]

permissions:
issues: write
pull-requests: write
release:
types: [published]

jobs:
comment:
close:
if: github.repository == 'mistic100/Photo-Sphere-Viewer'

runs-on: ubuntu-latest

steps:
- uses: bflad/action-milestone-comment@v1
- id: close
uses: mistic100/close-milestone@main
with:
milestone_name: ${{ github.ref_name }}
crash_on_missing: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- if: ${{ steps.close.outputs.milestone_id != null }}
uses: bflad/action-milestone-comment@v1
with:
milestone: ${{ steps.close.outputs.milestone_id }}
body: |
This feature/bug fix has been released in [version ${{ github.event.milestone.title }}](https://github.com/mistic100/Photo-Sphere-Viewer/releases/tag/${{ github.event.milestone.title }}).
This feature/bug fix has been released in [version ${{ github.ref_name }}](https://github.com/mistic100/Photo-Sphere-Viewer/releases/tag/${{ github.ref_name }}).
7 changes: 0 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NPM_TAG: latest

- uses: Akkjon/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
milestone_name: ${{ github.ref_name }}
crash_on_missing: false

- name: update issue templates
run: |
git fetch origin main --depth 1
Expand Down
2 changes: 1 addition & 1 deletion build/prepare-changelog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stdin.on('error', (e) => {
});

stdin.on('end', () => {
const content = `[Full changelog](https://github.com/mistic100/Photo-Sphere-Viewer/compare/${FROM_TAG}...${TO_TAG})
const content = `Full changelog: [${FROM_TAG}...${TO_TAG}](https://github.com/mistic100/Photo-Sphere-Viewer/compare/${FROM_TAG}...${TO_TAG})
${log
.trim()
Expand Down

0 comments on commit 8aeb36c

Please sign in to comment.