Skip to content

Commit

Permalink
Merge pull request #68 from indrastorms/dev
Browse files Browse the repository at this point in the history
chore: Merge branch `dev` to `main`
  • Loading branch information
indrastorms authored Dec 1, 2024
2 parents 533b802 + 1dbd0aa commit 13e0208
Show file tree
Hide file tree
Showing 36 changed files with 2,199 additions and 2,166 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_call:
push:
branches:
# - main
- main
- dev

jobs:
Expand Down Expand Up @@ -46,6 +46,13 @@ jobs:
fingerprint: ${{ env.GPG_FINGERPRINT }}

- name: Release
id: semantic_release
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
run: npm exec semantic-release

- name: Call Update Bundle Workflow
if: github.ref == 'refs/heads/main' # Check if the branch is main
uses: ./.github/workflows/update-bundle.yml # Path to the update-bundle workflow
with:
version: ${{ steps.semantic_release.outputs.version }} # Pass the version output
16 changes: 0 additions & 16 deletions .github/workflows/release_main.yml

This file was deleted.

76 changes: 45 additions & 31 deletions .github/workflows/update_bundle.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,53 @@
name: update bundle.json
name: Update Bundle

on:
workflow_dispatch:
workflow_call:
inputs:
version:
description: 'Version to use'
required: true
default: null

jobs:
update_bundle:
update-bundle:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Run Python script
run: |
pip install requests
python gen_bundle.py
- name: Commit and push changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add dropped-patches-bundle.json
git commit -a -m "update bundle.json [skip ci]"
git pull
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GIT_TOKEN }}
branch: main
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Update Bundle
run: |
version=${{ inputs.version }}
patches_asset_url="https://github.com/indrastorms/Dropped-Patches/releases/latest/download/dropped-patches-${version}.rvp"
info_dict=$(cat <<EOF
{
"patches": {
"version": "${version}",
"url": "${patches_asset_url}"
}
}
EOF
)
echo "bundle_file=dropped-patches-bundle.json" >> $GITHUB_ENV
echo "$info_dict" > "${{ env.bundle_file }}"
echo "Latest release information saved to ${{ env.bundle_file }}"
- name: Commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ${{ env.bundle_file }}
git commit -m "update ${{ env.bundle_file }} [skip ci]"
git pull
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GIT_TOKEN }}
branch: main
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ node_modules/

# Ignore IDEA files
.idea/

kls*.db
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"assets": [
{
"path": "build/libs/dropped-patches*"
"path": "patches/build/libs/patches-!(*sources*|*javadoc*).rvp?(.asc)"
}
],
successComment: false
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## [1.4.3-dev.1](https://github.com/indrastorms/Dropped-Patches/compare/v1.4.2...v1.4.3-dev.1) (2024-10-29)


### Bug Fixes

* Fix artifacts upload ([9fc3b50](https://github.com/indrastorms/Dropped-Patches/commit/9fc3b50cad684e43093ee71fb33bf9d4dbc299c3))

## [1.4.3-dev.1](https://github.com/indrastorms/Dropped-Patches/compare/v1.4.2...v1.4.3-dev.1) (2024-10-26)


### Bug Fixes

* force release ([bfddd8d](https://github.com/indrastorms/Dropped-Patches/commit/bfddd8d86b5cd3445e6fa54d946538fb2c80be78))

## [1.4.3-dev.1](https://github.com/indrastorms/Dropped-Patches/compare/v1.4.2...v1.4.3-dev.1) (2024-10-26)


### Bug Fixes

* force release ([bfddd8d](https://github.com/indrastorms/Dropped-Patches/commit/bfddd8d86b5cd3445e6fa54d946538fb2c80be78))

## [1.4.2](https://github.com/indrastorms/Dropped-Patches/compare/v1.4.1...v1.4.2) (2024-05-05)


Expand Down
51 changes: 0 additions & 51 deletions api/dropped-patches.api

This file was deleted.

132 changes: 0 additions & 132 deletions build.gradle.kts

This file was deleted.

38 changes: 0 additions & 38 deletions gen_bundle.py

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 1.4.2
version = 1.4.3-dev.1
Loading

0 comments on commit 13e0208

Please sign in to comment.