From 667ed97f877e41c99186534b0a0cf600b0e8e947 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Wed, 11 Sep 2024 15:16:58 -0600 Subject: [PATCH 1/7] Update README, ensuring our examples use the most up-to-date actions --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 64a3c79..87bf1cd 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build plugin # Remove or modify this step as needed run: | @@ -105,7 +105,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build plugin # Remove or modify this step as needed run: | @@ -133,6 +133,4 @@ Our GitHub Actions are available for use and remix under the MIT license. ## Like what you see? -

- -

+[![Work with 10up](https://10up.com/uploads/2016/10/10up-Github-Banner.png)](http://10up.com/contact/) From 65adb8bea615cee34fe5b9b302344a4cebb28e75 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Wed, 11 Sep 2024 15:35:11 -0600 Subject: [PATCH 2/7] Add fix for dubious ownership, from https://github.com/10up/action-wordpress-plugin-deploy/issues/116 --- build-zip.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-zip.sh b/build-zip.sh index 969a4c1..08a8884 100755 --- a/build-zip.sh +++ b/build-zip.sh @@ -51,6 +51,11 @@ if [[ "$BUILD_DIR" = false ]]; then TMP_DIR="${HOME}/archivetmp" mkdir "$TMP_DIR" + # Workaround for: detected dubious ownership in repository at '/github/workspace' issue. + # See: https://github.com/10up/action-wordpress-plugin-deploy/issues/116 + # Mark github workspace as safe directory. + git config --global --add safe.directory "$GITHUB_WORKSPACE" + git config --global user.email "10upbot+github@10up.com" git config --global user.name "10upbot on GitHub" From e225098eb043adfd8dca5b954f76ebb9a763568d Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Wed, 11 Sep 2024 15:35:36 -0600 Subject: [PATCH 3/7] Add fix for missing changed files, from https://github.com/10up/action-wordpress-plugin-deploy/pull/130 --- build-zip.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build-zip.sh b/build-zip.sh index 08a8884..988109b 100755 --- a/build-zip.sh +++ b/build-zip.sh @@ -59,6 +59,14 @@ if [[ "$BUILD_DIR" = false ]]; then git config --global user.email "10upbot+github@10up.com" git config --global user.name "10upbot on GitHub" + # Ensure git archive will pick up any changed files in the directory. + # See https://github.com/10up/action-wordpress-plugin-deploy/pull/130 + test $(git ls-files --deleted) && git rm $(git ls-files --deleted) + if [ -n "$(git status --porcelain --untracked-files=all)" ]; then + git add . + git commit -m "Include build step changes" + fi + # If there's no .gitattributes file, write a default one into place if [[ ! -e "$GITHUB_WORKSPACE/.gitattributes" ]]; then cat > "$GITHUB_WORKSPACE/.gitattributes" <<-EOL From d996b21b3de29ba071642ea003415f70db3f31a7 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 28 Jan 2025 10:53:20 -0700 Subject: [PATCH 4/7] Install svn if needed --- build-zip.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/build-zip.sh b/build-zip.sh index 988109b..eec1172 100755 --- a/build-zip.sh +++ b/build-zip.sh @@ -6,6 +6,32 @@ # it does not exit with a 0, and we only care about the final exit. set -eo +# Function to check if a command exists +command_exists() { + command -v "$1" >/dev/null 2>&1 +} + +# Check if SVN is installed +if command_exists svn; then + echo "SVN is already installed." +else + echo "SVN is not installed. Installing SVN..." + + # Update the package list + sudo apt-get update -y + + # Install SVN + sudo apt-get install -y subversion + + # Verify installation + if command_exists svn; then + echo "SVN was successfully installed." + else + echo "Failed to install SVN. Please check your system configuration." + exit 1 + fi +fi + # Allow some ENV variables to be customized if [[ -z "$SLUG" ]]; then SLUG=${GITHUB_REPOSITORY#*/} From 89995e4df9848f677cbddea5c5ec4e703b0132d4 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 28 Jan 2025 10:57:36 -0700 Subject: [PATCH 5/7] Add quotes to fix shellcheck --- build-zip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-zip.sh b/build-zip.sh index eec1172..645b3be 100755 --- a/build-zip.sh +++ b/build-zip.sh @@ -87,7 +87,7 @@ if [[ "$BUILD_DIR" = false ]]; then # Ensure git archive will pick up any changed files in the directory. # See https://github.com/10up/action-wordpress-plugin-deploy/pull/130 - test $(git ls-files --deleted) && git rm $(git ls-files --deleted) + test "$(git ls-files --deleted)" && git rm "$(git ls-files --deleted)" if [ -n "$(git status --porcelain --untracked-files=all)" ]; then git add . git commit -m "Include build step changes" From 281b398d1d3e09565fc8078180d51ac08e954923 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 4 Feb 2025 09:09:22 -0700 Subject: [PATCH 6/7] Update changelog --- CHANGELOG.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cc2c99..bb00813 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,29 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD +## [1.0.2] - 2025-02-04 + +### Fixed + +- Handle the error `detected dubious ownership in repository at '/github/workspace'` when using a `.gitattributes` file (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh) via [#7](https://github.com/10up/action-wordpress-plugin-build-zip/pull/7)). +- Ensure built files are included when used without a `BUILD_DIR` and `.distignore` file (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh) via [#7](https://github.com/10up/action-wordpress-plugin-build-zip/pull/7)). +- Install SVN as part of the workflow, if needed (props [@kirtangajjar](https://github.com/kirtangajjar), [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi) via [#8](https://github.com/10up/action-wordpress-plugin-build-zip/pull/8)). + +### Developer + +- Replaced `lee-dohm/no-response` with `actions/stale` to help with closing no-response/stale issues (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#5](https://github.com/10up/action-wordpress-plugin-build-zip/pull/5)). + ## [1.0.1] - 2024-03-20 + ### Changed -- Updated to v4 of `upload-artifact`, the action now exposes the artifact URL with: `${{ steps.upload-plugin-artifact.outputs.artifact-url }}` (props [@jdevalk](https://github.com/jdevalk) via [#3](https://github.com/10up/action-wordpress-plugin-build-zip/pull/3)). + +- Updated to v4 of `upload-artifact`, the action now exposes the artifact URL with: `${{ steps.upload-plugin-artifact.outputs.artifact-url }}` (props [@jdevalk](https://github.com/jdevalk), [@dkotter](https://github.com/dkotter) via [#3](https://github.com/10up/action-wordpress-plugin-build-zip/pull/3)). ## [1.0.0] - 2022-12-01 + - Initial release. [Unreleased]: https://github.com/10up/action-wordpress-plugin-build-zip/compare/stable...develop +[1.0.2]: https://github.com/10up/action-wordpress-plugin-build-zip/compare/1.0.1...1.0.2 [1.0.1]: https://github.com/10up/action-wordpress-plugin-build-zip/compare/1.0.0...1.0.1 [1.0.0]: https://github.com/10up/action-wordpress-plugin-build-zip/releases/tag/1.0.0 From 579d2bb378496166d3ac6de4446b7627bf45c597 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 4 Feb 2025 09:10:54 -0700 Subject: [PATCH 7/7] Update CREDITS.md --- CREDITS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CREDITS.md b/CREDITS.md index a0f7f36..500f238 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc. -[Darin Kotter (@dkotter)](https://github.com/dkotter), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Joost de Valk (@jdevalk)](https://github.com/jdevalk). +[Darin Kotter (@dkotter)](https://github.com/dkotter), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Joost de Valk (@jdevalk)](https://github.com/jdevalk), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Kirtan Gajjar (@kirtangajjar)](https://github.com/kirtangajjar), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi). ## Libraries