Skip to content

Commit

Permalink
CI: Replace forbidden actions with cli code
Browse files Browse the repository at this point in the history
the semver checks action and the release action are not
in the allow-list so replace them with their respective
cli counterparts.
These changes can only be tested by someone with permissions,
so the release part only releases a draft release for now.
  • Loading branch information
jschwe committed Jun 22, 2023
1 parent a7060f1 commit 04a8001
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# someone with permissions to create a tag.
contents: write

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
Expand All @@ -25,9 +25,9 @@ jobs:
toolchain: stable

- name: semver
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
rust-toolchain: stable
run: |
cargo install cargo-semver-checks --locked
cargo semver-checks check-release
- name: Build cbindgen
run: |
Expand All @@ -50,12 +50,10 @@ jobs:
tail -n +3 CHANGES | sed '/^##/q' |
sed '$ d' | awk '{$1=$1};1' > CHANGES.txt
# Note: This is untested, so for now the `--draft` parameter is added
- name: Create a release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.tagName.outputs.version }}
body_path: CHANGES.txt
files: |
target/release/cbindgen
run: |
TAG=${{ steps.tagName.outputs.version }}
gh release create ${TAG} --title "${TAG}" --notes-file "CHANGES.txt" target/release/cbindgen#cbindgen-ubuntu20.04' --draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 04a8001

Please sign in to comment.