Skip to content

Merge pull request #134 from GiganticMinecraft/lint-actions #20

Merge pull request #134 from GiganticMinecraft/lint-actions

Merge pull request #134 from GiganticMinecraft/lint-actions #20

Workflow file for this run

name: CD
on:
push:
branches:
- main
permissions: {}
jobs:
ci:
uses: GiganticMinecraft/ObserverUtils/.github/workflows/ci.yaml@main
cd:
name: Release
runs-on: ubuntu-22.04
needs:
- ci
# softprops/action-gh-release requires this permisson
permissions:
contents: write
timeout-minutes: 5
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Output SHA
uses: benjlevesque/short-sha@599815c8ee942a9616c92bcfb4f947a3b670ab0b # v3.0.0
id: short-sha
- name: Download artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- name: Create and push a tag
id: tag-name
run: |
TAG_NAME="sha-${SHA}"
git tag "$TAG_NAME"
git push origin "$TAG_NAME"
echo "value=$TAG_NAME" >> "$GITHUB_OUTPUT"
echo "$TAG_NAME"
env:
SHA: ${{ steps.short-sha.outputs.sha }}
- name: Create release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
with:
tag_name: ${{ steps.tag-name.outputs.value }}
draft: false
prerelease: true
files: artifact/*.jar