Skip to content

Commit

Permalink
build(github): split actions
Browse files Browse the repository at this point in the history
  • Loading branch information
breakthewall committed Oct 8, 2021
1 parent 5ee3e35 commit b6f5105
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 45 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/conda-forge.yml

This file was deleted.

41 changes: 40 additions & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ on:

jobs:

build:
tag-chengelog:
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 @@ -31,6 +33,8 @@ jobs:
body: ${{ steps.tag_version.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

## UPDATE CHANGELOG
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
Expand All @@ -57,3 +61,38 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

feedstock:
runs-on: ubuntu-latest
steps:
## UPDATE CONDA-FORGE FEEDSTOCK
- name: Checkout feedstock fork
uses: actions/checkout@v2
with:
repository: brsynth/brs_utils-feedstock
persist-credentials: false
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
# token: ${{ secrets.GITHUB_TOKEN }} # `GitHub_PAT` is a secret that contains your PAT
# path: my-tools
- name: Update recipe
run: |
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 = \")[^>]+(\" %\})/\1somethin\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_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: brsynth
GITHUB_EMAIL: [email protected]
# DEPLOY_URL: github.com/conda-forge/brs_utils-feedstock
VERSION: ${{ steps.tag_version.outputs.new_tag }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: brsynth/brs_utils-feedstock
# branch: ${{ github.ref }}

0 comments on commit b6f5105

Please sign in to comment.