Skip to content

Commit

Permalink
feat: add workflow to automate release
Browse files Browse the repository at this point in the history
  • Loading branch information
raimundo-henriques committed Dec 20, 2023
1 parent dae36f5 commit f3dff9b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
branches: [automate-release]
# pull_request:
# branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: creates release
run: sh ./spec/release.s
- name: Put current date into a variable
run: |
$NOW=& Get-Date -format yyyyMMdd
echo "NOW=$NOW" >> $env:GITHUB_ENV
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: "spec/release"
destination-github-username: "wbcsd"
destination-repository-name: "tr"
user-email:
target-directory: ./temp/${{env.NOW}}
target-branch: automated-release-test
create-target-branch-if-needed: true
12 changes: 12 additions & 0 deletions spec/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

cd spec/v2
pip3 install bikeshed && bikeshed update
make
mkdir -p ../release/diagrams

for i in diagrams/*.svg; do
cp $i ../release/diagrams/
done

cp index.html ../release/
Loading

0 comments on commit f3dff9b

Please sign in to comment.