Skip to content

Commit 1e97546

Browse files
committed
Removed condition from Deply step
Signed-off-by: Kasun <kasun.ranasinghe@icloud.com>
1 parent 13e2a0f commit 1e97546

File tree

1 file changed

+57
-59
lines changed

1 file changed

+57
-59
lines changed

.github/workflows/publish.yml

Lines changed: 57 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,73 @@
11
name: Publish to crates.io
22

33
on:
4-
push:
5-
tags:
6-
# Only on SemVer tags like "7.3.0".
7-
# Push a new tag to make a new release.
8-
# It should match the version in Cargo.toml
9-
# (Perhaps we could add a check for this?)
10-
- '[0-9]+.[0-9]+.[0-9]+'
4+
push:
5+
tags:
6+
# Only on SemVer tags like "7.3.0".
7+
# Push a new tag to make a new release.
8+
# It should match the version in Cargo.toml
9+
# (Perhaps we could add a check for this?)
10+
- "[0-9]+.[0-9]+.[0-9]+"
1111

1212
jobs:
13-
build:
14-
runs-on: ubuntu-latest
13+
build:
14+
runs-on: ubuntu-latest
1515

16-
services:
17-
ldap:
18-
image: openidentityplatform/opendj
19-
ports:
20-
- 1389:1389
21-
options: >
22-
--env ROOT_USER_DN="cn=manager"
16+
services:
17+
ldap:
18+
image: openidentityplatform/opendj
19+
ports:
20+
- 1389:1389
21+
options: >
22+
--env ROOT_USER_DN="cn=manager"
2323
24-
steps:
25-
- name: Checkout code
26-
uses: actions/checkout@v3
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v3
2727

28-
- name: Get LDAP container ID
29-
id: ldap_container_id
30-
run: echo "LDAP_CONTAINER_ID=$(docker ps --filter 'ancestor=openidentityplatform/opendj:latest' -q)" >> $GITHUB_ENV
28+
- name: Get LDAP container ID
29+
id: ldap_container_id
30+
run: echo "LDAP_CONTAINER_ID=$(docker ps --filter 'ancestor=openidentityplatform/opendj:latest' -q)" >> $GITHUB_ENV
3131

32-
- name: Copy LDIF to LDAP container
33-
run: docker cp ./data/data.ldif ${{ env.LDAP_CONTAINER_ID }}:/tmp/data.ldif
32+
- name: Copy LDIF to LDAP container
33+
run: docker cp ./data/data.ldif ${{ env.LDAP_CONTAINER_ID }}:/tmp/data.ldif
3434

35-
- name: Import LDIF into OpenDJ
36-
run: |
37-
docker exec ${{ job.services.ldap.id }} \
38-
/opt/opendj/bin/ldapmodify -h localhost -p 1389 -D "cn=manager" -w password -a -f /tmp/data.ldif
35+
- name: Import LDIF into OpenDJ
36+
run: |
37+
docker exec ${{ job.services.ldap.id }} \
38+
/opt/opendj/bin/ldapmodify -h localhost -p 1389 -D "cn=manager" -w password -a -f /tmp/data.ldif
3939
40-
# Step 3: Install Rust
41-
- name: Set up Rust
42-
uses: actions-rs/toolchain@v1
43-
with:
44-
toolchain: stable
45-
profile: minimal
40+
# Step 3: Install Rust
41+
- name: Set up Rust
42+
uses: actions-rs/toolchain@v1
43+
with:
44+
toolchain: stable
45+
profile: minimal
4646

47-
# Step 4: Build the Rust project
48-
- name: Build
49-
run: cargo build --verbose
47+
# Step 4: Build the Rust project
48+
- name: Build
49+
run: cargo build --verbose
5050

51-
# Step 5: Run unit tests
52-
- name: Run tests
53-
run: cargo test --verbose
51+
# Step 5: Run unit tests
52+
- name: Run tests
53+
run: cargo test --verbose
5454

55-
# Check that there are no SemVer violations before releasing.
56-
# https://github.com/obi1kenobi/cargo-semver-checks
57-
- name: Check semver
58-
uses: obi1kenobi/cargo-semver-checks-action@v2
59-
with:
60-
feature-group: default-features
61-
features: pool
55+
# Check that there are no SemVer violations before releasing.
56+
# https://github.com/obi1kenobi/cargo-semver-checks
57+
- name: Check semver
58+
uses: obi1kenobi/cargo-semver-checks-action@v2
59+
with:
60+
feature-group: default-features
61+
features: pool
6262

63-
# Another check with the mutually exclusive tls-rustls feature enabled.
64-
- name: Check semver
65-
uses: obi1kenobi/cargo-semver-checks-action@v2
66-
with:
67-
feature-group: only-explicit-features
68-
features: tls-rustls,pool
63+
# Another check with the mutually exclusive tls-rustls feature enabled.
64+
- name: Check semver
65+
uses: obi1kenobi/cargo-semver-checks-action@v2
66+
with:
67+
feature-group: only-explicit-features
68+
features: tls-rustls,pool
6969

70-
71-
- name: Deploy to crates.io
72-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
73-
run: cargo publish
74-
env:
75-
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
70+
- name: Deploy to crates.io
71+
run: cargo publish
72+
env:
73+
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}

0 commit comments

Comments
 (0)