Ubah ke .yaml
This commit is contained in:
1 parent
24c5d3e1f2
commit
f7cd4603c7
1 file changed
@@ -0,0 +1,67 @@
|
||||
name: Penerbitan Plugin
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
types: ["opened", "synchronize"]
|
||||
|
||||
jobs:
|
||||
persiapan:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
organisasi: ${{ steps.var.outputs.organisasi }}
|
||||
steps:
|
||||
- name: Persiapan variabel
|
||||
id: var
|
||||
run: |
|
||||
echo "organisasi=$(echo '${{ gitea.repository }}' | cut -d'/' -f1)" \
|
||||
>> $GITEA_OUTPUT
|
||||
|
||||
penerbitan:
|
||||
runs-on: ubuntu-latest
|
||||
needs: persiapan
|
||||
steps:
|
||||
- name: Unduh paket untuk membangun citra
|
||||
run: |
|
||||
apt update -y
|
||||
sudo apt install -y libwebkit2gtk-4.1-dev \
|
||||
build-essential \
|
||||
curl \
|
||||
wget \
|
||||
file \
|
||||
libxdo-dev \
|
||||
libssl-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
librsvg2-dev \
|
||||
libudev-dev
|
||||
apt clean -y
|
||||
|
||||
- name: Unduh program
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Unduh Rust
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
rustflags: "-A warnings"
|
||||
|
||||
- name: Penerbitan peti Cargo
|
||||
run: |
|
||||
cargo publish
|
||||
env:
|
||||
CARGO_REGISTRIES_GITEA_TOKEN: Bearer ${{ secrets.KUNCI_PENERBITAN }}
|
||||
|
||||
- name: Unduh pnpm
|
||||
uses: pnpm/setup@v2
|
||||
with:
|
||||
version: 11
|
||||
|
||||
- name: Penerbitan paket NPM
|
||||
run: |
|
||||
pnpm i
|
||||
npm config set @${{ needs.persiapan.outputs.organisasi }}:registry=https://${{ vars.ALAMAT_GITEA }}/api/packages/${{ needs.persiapan.outputs.organisasi }}/npm/
|
||||
npm config set -- '//${{ vars.ALAMAT_GITEA }}/api/packages/${{ needs.persiapan.outputs.organisasi }}/npm/:_authToken' "${{ secrets.KUNCI_PENERBITAN }}"
|
||||
npm publish
|
||||
rm -rf pnpm-lock.yaml .pnpm-store/
|
||||
Reference in new issue
Block a user