Skip to content

Commit

Permalink
Merge branch 'release/1.0.0-alpha.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Aug 5, 2024
2 parents 460550e + 1c0847a commit 49d9472
Show file tree
Hide file tree
Showing 12 changed files with 1,852 additions and 1,022 deletions.
47 changes: 18 additions & 29 deletions .github/workflows/release.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,39 +48,28 @@ jobs:
verbose: true

- run: |
cd dist
ls -al
VERSION=${GITHUB_REF/refs\/tags\//}
TAG='latest'
if [[ $VERSION =~ 'alpha' || $VERSION =~ 'beta' ]]; then
TAG='next'
fi
npm publish --tag $TAG --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
NPM_TAG='latest'
IS_PRERELEASE=false
# @see https://github.com/actions/create-release/issues/38#issuecomment-715327220
# @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files
- name: Prepare the changelog from the tag message
id: prepare_changelog
run: |
PRERELEASE=false
# Check release type
if [[ $GITHUB_REF_NAME =~ 'alpha' || $GITHUB_REF_NAME =~ 'beta' || $GITHUB_REF_NAME =~ 'rc' ]]; then
echo "This is a prerelease."
PRERELEASE=true
NPM_TAG='next'
IS_PRERELEASE=true
fi
echo "is_prerelease=$PRERELEASE" >> $GITHUB_ENV
# @see https://github.com/actions/create-release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
echo "NPM_TAG=$NPM_TAG" >> $GITHUB_ENV
echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_ENV
- uses: JS-DevTools/npm-publish@v3
with:
provenance: true
package: dist/
tag: ${{ env.NPM_TAG }}
token: ${{ secrets.NPM_TOKEN }}

- uses: ncipollo/release-action@v1
with:
tag_name: ${{ github.ref }}
release_name: v${{ github.ref_name }}
tag: ${{ github.ref }}
name: v${{ github.ref_name }}
body: Please refer to [CHANGELOG.md](https://github.com/studiometa/ui/blob/${{ github.ref_name }}/CHANGELOG.md) for details.
draft: false
prerelease: ${{ env.is_prerelease }}
prerelease: ${{ env.IS_PRERELEASE }}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [v1.0.0-alpha.4](https://github.com/studiometa/ui/compare/1.0.0-alpha.3..1.0.0-alpha.4) (2024-08-05)

### Fixed

- Fix release and publish GitHub Action ([173aff6](https://github.com/studiometa/ui/commit/173aff6))

### Changed

- Update @studiometa/playground 0.1.3 → 0.1.4 ([e82f93a](https://github.com/studiometa/ui/commit/e82f93a))

## [v1.0.0-alpha.3](https://github.com/studiometa/ui/compare/1.0.0-alpha.2..1.0.0-alpha.3) (2024-08-02)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "studiometa/ui",
"version": "1.0.0-alpha.3",
"version": "1.0.0-alpha.4",
"description": "A set of opiniated, unstyled and accessible components.",
"license": "MIT",
"require": {
Expand Down
Loading

0 comments on commit 49d9472

Please sign in to comment.