-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #218 from DaveKeehl/dev
Release version 1.1.0
- Loading branch information
Showing
8 changed files
with
77 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,52 @@ | ||
name: 'Publish to NPM' | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.package-version.outputs.current-version }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get current version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
with: | ||
path: 'packages/svelte-reveal' | ||
|
||
- name: Get latest tag | ||
id: latest-tag | ||
uses: 'WyriHaximus/github-action-get-previous-tag@v1' | ||
|
||
- name: Compare versions | ||
uses: madhead/semver-utils@v4 | ||
id: version | ||
with: | ||
version: ${{ steps.latest-tag.outputs.tag }} | ||
|
||
- name: Detected invalid semver upgrade | ||
if: ${{ steps.package-version.outputs.current-version != steps.version.outputs.inc-major && steps.package-version.outputs.current-version != steps.version.outputs.inc-minor && steps.package-version.outputs.current-version != steps.version.outputs.inc-patch }} | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
core.setFailed('Invalid semver upgrade (${{ steps.latest-tag.outputs.tag }} -> ${{ steps.package-version.outputs.current-version }})') | ||
release: | ||
if: github.event.pull_request.merged == true && github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
needs: check-version | ||
if: github.event.pull_request.merged == true | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
@@ -23,7 +59,7 @@ jobs: | |
node-version: 20 | ||
cache: 'npm' | ||
|
||
- name: Installing dependencies | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build package | ||
|
@@ -40,12 +76,6 @@ jobs: | |
package: ./packages/svelte-reveal/package.json | ||
strategy: upgrade | ||
|
||
- name: Get Package Version | ||
id: package-version | ||
uses: martinbeentjes/npm-get-version-action@master | ||
with: | ||
path: 'packages/svelte-reveal' | ||
|
||
- name: Extract release notes | ||
id: extract-release-notes | ||
uses: ffurrer2/extract-release-notes@v1 | ||
|
@@ -58,8 +88,8 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.package-version.outputs.current-version }} | ||
release_name: ${{ steps.package-version.outputs.current-version }} | ||
tag_name: ${{ needs.check-version.outputs.version }} | ||
release_name: ${{ needs.check-version.outputs.version }} | ||
draft: false | ||
prerelease: false | ||
body: ${{ steps.extract-release-notes.outputs.release_notes }} | ||
|
@@ -71,6 +101,6 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
asset_path: ./packages/svelte-reveal/svelte-reveal-${{ steps.package-version.outputs.current-version }}.tgz | ||
asset_name: svelte-reveal-${{ steps.package-version.outputs.current-version }}.tgz | ||
asset_path: ./packages/svelte-reveal/svelte-reveal-${{ needs.check-version.outputs.version }}.tgz | ||
asset_name: svelte-reveal-${{ needs.check-version.outputs.version }}.tgz | ||
asset_content_type: application/gzip |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.sr__hide { | ||
display: none !important; | ||
visibility: hidden; | ||
} |