Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhsm committed Mar 24, 2024
1 parent 36caf09 commit a7c1b88
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,53 @@ jobs:
env:
tag_prefix: 2HOL_v
steps:
- name: Setup auth for other repositories
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.GHA_AUTH_APP_ID }}
private-key: ${{ secrets.GHA_AUTH_PRIVATE_KEY }}
repositories: OneLifeData7 # Enables commit and tag push to OneLifeData7
# - name: Setup auth for other repositories
# uses: actions/create-github-app-token@v1
# id: app-token
# with:
# app-id: ${{ vars.GHA_AUTH_APP_ID }}
# private-key: ${{ secrets.GHA_AUTH_PRIVATE_KEY }}
# repositories: OneLifeData7 # Enables commit and tag push to OneLifeData7

- name: Checkout OneLife
uses: actions/checkout@v4
with:
repository: twohoursonelife/OneLife
path: OneLife

- name: Checkout OneLifeData7
uses: actions/checkout@v4
with:
repository: twohoursonelife/OneLifeData7
path: OneLifeData7
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
# - name: Checkout OneLifeData7
# uses: actions/checkout@v4
# with:
# repository: twohoursonelife/OneLifeData7
# path: OneLifeData7
# fetch-depth: 0
# token: ${{ steps.app-token.outputs.token }}

- name: Calculate next version
run: |
cd OneLifeData7
old_version=$(git describe --tags --abbrev=0 --match="2HOL_v[0-9]*" | sed -e "s/2HOL_v//")
echo "new_version=$($old_version + 1)" >> $GITHUB_ENV
echo "new_version=$(($old_version + 1))" >> $GITHUB_ENV
echo -n "$new_version" > dataVersionNumber.txt
- name: Commit and tag version - OneLifeData7
uses: EndBug/add-and-commit@v9
with:
cwd: OneLifeData7/
default_author: github_actions
message: Updatated dataVersionNumber to ${{ env.new_version }}
tag: ${{ env.tag_prefix }}${{ env.new_version }} -m "Tag automatically generated by GHA update script."
new_branch: test-release
# - name: Commit and tag version - OneLifeData7
# uses: EndBug/add-and-commit@v9
# with:
# cwd: OneLifeData7/
# default_author: github_actions
# message: Updatated dataVersionNumber to ${{ env.new_version }}
# tag: ${{ env.tag_prefix }}${{ env.new_version }} -m "Tag automatically generated by GHA update script."
# new_branch: test-release

- name: Tag version - OneLife
run: |
cd OneLife
gh auth status
exit
git -C OneLife/ config user.name "github-actions"
git -C OneLife/ config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git -C OneLife/ tag ${{ env.tag_prefix }}${{ env.new_version }} -m "Tag automatically generated by GHA update script."
gh auth status
git -C OneLife/ push origin --tags
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit a7c1b88

Please sign in to comment.