Skip to content

Commit

Permalink
added workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
filipandren committed Apr 17, 2024
1 parent eccc914 commit d9eeb25
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Trigger word-input-release

on:
workflow_dispatch:
push:
branches:
- main

jobs:
dispatch_event:
runs-on: ubuntu-latest
name: Dispatch event

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get version info
id: tag
run: |
NEXT_VERSION=$(./get_next.sh ${{ github.repository_owner }} test-case-repository-word-input)
echo "NEXT_VERSION: ${NEXT_VERSION}"
echo ::set-output name=next-release::${NEXT_VERSION}
- name: Create Archive
id: create-archive
run: |
pushd word-input && zip ../test-cases -r . && popd
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: ./test-cases.zip
artifactContentType: application/zip
tag: ${{ steps.tag.outputs.next-release }}
commit: main

# - name: Create Release
# id: create-release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ steps.tag.outputs.next-release }}
# release_name: ${{ steps.tag.outputs.next-release }}
# draft: false
# prerelease: false

# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create-release.outputs.upload_url }}
# asset_path: ./test-cases.zip
# asset_name: test-cases.zip
# asset_content_type: application/zip

- uses: peter-evans/repository-dispatch@v3
with:
event-type: release_event
token: ${{ secrets.REPO_TRIGGER_KEY }}
repository: "${{ github.repository_owner }}/test-case-repository-word2md"
client-payload: '{"tag": "${{ steps.tag.outputs.next-release }}" }'

0 comments on commit d9eeb25

Please sign in to comment.