Skip to content

Commit 8cc34c4

Browse files
authored
Merge pull request #190 from woocommerce/add/actions-get-plugin-releases-from-github
Add support to the `get-plugin-releases` action for fetching releases from GitHub
2 parents 3c353be + f7df751 commit 8cc34c4

File tree

12 files changed

+1969
-93
lines changed

12 files changed

+1969
-93
lines changed

.github/scripts/github-actions-create-and-commit-build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ git commit -q -m "Create the ${TAG_NAME} release build for the \`github-actions\
3535
git checkout HEAD^ -- ./packages/github-actions/actions
3636
git restore --staged .
3737

38-
## 3. Avoid committing src directories to the build.
38+
## 3. Avoid committing src and test directories to the build.
3939
echo "/packages/github-actions/actions/*/src" > .gitignore
40+
echo "**/__tests__/" >> .gitignore
4041

4142
## 4. Unzip all of the PHP actions and replace them.
4243
for zipFile in $(find ./packages/github-actions/actions -name "*.zip" -mindepth 1 -maxdepth 1) ; do
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
overrides: [
3+
{
4+
files: [ '**/__tests__/*.test.js' ],
5+
parser: '@babel/eslint-parser',
6+
},
7+
],
8+
};

packages/github-actions/actions/eslint-annotation/src/eslintFormatter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* External dependencies
33
*/
4-
import { ESLint } from 'eslint';
4+
import { ESLint } from 'eslint'; // eslint-disable-line import/no-extraneous-dependencies
55

66
/**
77
* Internal dependencies

packages/github-actions/actions/get-plugin-releases/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Get latest releases versions from a specific WordPress.org plugin or from WordPress core
1+
# Get the latest release versions of a specific plugin from WordPress.org or GitHub repository
22

33
This action provides the following functionality for GitHub Actions users:
44

5-
- Get L-x release versions via GitHub job
5+
- Get L-x release versions from WordPress.org or GitHub API via GitHub Actions
66

77
## Usage
88

@@ -21,12 +21,21 @@ jobs:
2121
name: Get Plugin Releases
2222
runs-on: ubuntu-latest
2323
steps:
24-
- name: Get Release versions from WooCommerce
24+
- name: Get Release versions from WooCommerce (WordPress.org)
2525
id: wc-versions
2626
uses: woocommerce/grow/get-plugin-releases@actions-v2
2727
with:
2828
slug: woocommerce
2929

30+
- name: Get Release versions from WooCommerce (GitHub)
31+
id: wc-gh-versions
32+
uses: woocommerce/grow/get-plugin-releases@actions-v2
33+
with:
34+
source: github
35+
slug: woocommerce/woocommerce
36+
# Required if it's a private GitHub repository
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
3039
- name: Get Release versions from WordPress
3140
id: wp-versions
3241
uses: woocommerce/grow/get-plugin-releases@actions-v2
@@ -56,7 +65,8 @@ jobs:
5665

5766
- name: Show the versions output
5867
run: |
59-
echo "The versions WooCommerce are: ${{ steps.wc-versions.outputs.versions }}"
68+
echo "The versions WooCommerce (WPORG) are: ${{ steps.wc-versions.outputs.versions }}"
69+
echo "The versions WooCommerce (GitHub) are: ${{ steps.wc-gh-versions.outputs.versions }}"
6070
echo "The versions Wordpress are: ${{ steps.wp-versions.outputs.versions }}."
6171
echo "The versions GLA are: ${{ steps.gla-versions.outputs.versions }}."
6272
echo "The 4 versions WC RC are: ${{ steps.wc-versions-l3-rc.outputs.versions }}."

0 commit comments

Comments
 (0)