Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

187 Release action #240

Merged
merged 7 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.github
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
tags:
- '*.*.*'

env:
PLUGIN_SLUG: wp-feature-notifications

jobs:
release:
name: Create Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: ./.github/actions/node

- name: Build package
shell: bash
run: npm run build --if-present

- name: Create artifacts
shell: bash
run: rsync -rc --exclude-from="${GITHUB_WORKSPACE}/.distignore" "${GITHUB_WORKSPACE}/" "${PLUGIN_SLUG}/" --delete --delete-excluded && zip -r "${GITHUB_WORKSPACE}/${PLUGIN_SLUG}.zip" "${PLUGIN_SLUG}"

- name: Release
uses: softprops/action-gh-release@v1
with:
name: github.ref
files: ${{ PLUGIN_SLUG }}.zip
fail_on_unmatched_files: true
target_commitish: trunk
generate_release_notes: true
draft: true
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# OS fixes
.DS_Store

# IDE-specific
.phpunit.result.cachecghooks.lock

# Vendor code
/node_modules/
/vendor/
.phpunit.result.cachecghooks.lock

# Build Files
/build/
1 change: 0 additions & 1 deletion build/wp-notify.asset.php

This file was deleted.

2 changes: 0 additions & 2 deletions build/wp-notify.css

This file was deleted.

1 change: 0 additions & 1 deletion build/wp-notify.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/stories/Dash-multiple.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../../src/stories/assets/wp-core/normalize.css';
import '../../src/stories/assets/wp-core/site-health.css';

/** Wp-notify style */
import '../../build/wp-notify.css';
import '../styles/wp-notify.scss';
import jsonData from '../../includes/restapi/fake_api.json';
import { NoticesLoop } from '../scripts/components/NoticesLoop';
import { getSorted } from '../scripts/utils/drawer';
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Dash-single.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../../src/stories/assets/wp-core/normalize.css';
import '../../src/stories/assets/wp-core/site-health.css';

/** Wp-notify style */
import '../../build/wp-notify.css';
import '../styles/wp-notify.scss';
import '@wordpress/components/build-style/style.css';

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Hub-multiple.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import '../../src/stories/assets/wp-core/normalize.css';
import '../../src/stories/assets/wp-core/site-health.css';

/** Wp-notify style */
import '../../build/wp-notify.css';
import '../styles/wp-notify.scss';
import '@wordpress/components/build-style/style.css';

import jsonData from '../../includes/restapi/fake_api.json';
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Hub-single.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import '../../src/stories/assets/wp-core/normalize.css';
import '../../src/stories/assets/wp-core/site-health.css';

/** Wp-notify style */
import '../../build/wp-notify.css';
import '../styles/wp-notify.scss';
import '@wordpress/components/build-style/style.css';

import { Notice } from '../scripts/components/Notice';
Expand Down