Skip to content

Commit

Permalink
build(github): chain workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
breakthewall committed Oct 10, 2021
1 parent 70f7360 commit 6a4a2e2
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 57 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/feedstock.yml

This file was deleted.

58 changes: 53 additions & 5 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Tag/Release
name: Tag/CHANGELOG/Feedstock

on:
push:
Expand All @@ -9,11 +9,10 @@ on:

jobs:

tag-changelog:
## CREATE TAG/RELEASE
tag:
runs-on: ubuntu-latest
steps:

## CREATE TAG/RELEASE
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
Expand All @@ -34,7 +33,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

## UPDATE CHANGELOG
## UPDATE CHANGELOG
changelog:
needs: tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
Expand Down Expand Up @@ -62,6 +65,51 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

## UPDATE CONDA-FORGE FEEDSTOCK
feedstock:
needs: changelog
runs-on: ubuntu-latest
steps:
- name: Checkout feedstock fork
uses: actions/checkout@v2
with:
repository: brsynth/brs_utils-feedstock
persist-credentials: false
fetch-depth: 0
path: feedstock
- name: Update recipe
run: |
cd feedstock
wget -O- https://github.com/brsynth/brs-utils/archive/refs/tags/$VERSION.tar.gz | shasum -a 256 > sha.txt
sha=`python -c "f = open('sha.txt'); print(f.read().split()[0]); f.close()"`
rm -f sha.txt
sed -i -E "s/(\{% set version = \")[^>]+(\" %\})/\1$VERSION\2/" recipe/meta.yaml
sed -i -E "s/(sha256: )[^>]+/\1$sha/" recipe/meta.yaml
git config --local user.email "$GITHUB_EMAIL"
git config --local user.name "$GITHUB_USERNAME"
git commit -m "chore(meta.yml): update version" -a
env:
GITHUB_USERNAME: brsynth
GITHUB_EMAIL: [email protected]
VERSION: ${{ steps.tag_version.outputs.new_tag }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.FEEDSTOCK }}
repository: brsynth/brs_utils-feedstock
directory: feedstock

# ## PULL RESQUEST
# - name: Checkout
# uses: actions/checkout@v2
# with:
# token: ${{ secrets.PAT }}
# repository: conda-forge/brs_utils-feedstock
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v3
# with:
# token: ${{ secrets.FEEDSTOCK }}

# ## UPDATE CONDA-FORGE FEEDSTOCK
# - name: Checkout feedstock fork
# uses: actions/checkout@v2
Expand Down

0 comments on commit 6a4a2e2

Please sign in to comment.